Is the square brackets in output of -XX:+PrintStubCode a typo?

Wang Xue wangxue at loongson.cn
Tue Feb 19 12:54:48 UTC 2019


Update the patch:


diff -r 4fb7f7e3e05b src/hotspot/share/runtime/stubCodeGenerator.cpp
--- a/src/hotspot/share/runtime/stubCodeGenerator.cpp   Tue Feb 19 
12:56:02 2019 +0100
+++ b/src/hotspot/share/runtime/stubCodeGenerator.cpp   Tue Feb 19 
20:38:22 2019 +0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights 
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -60,7 +60,7 @@
    st->print("%s", group());
    st->print("::");
    st->print("%s", name());
-  st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", 
p2i(begin()), p2i(end()), size_in_bytes());
+  st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (%d bytes)", 
p2i(begin()), p2i(end()), size_in_bytes());
  }

  // Implementation of StubCodeGenerator


Thanks,
Wang Xue


在 2/19/19 20:21, Leslie Zhai 写道:
> Filed https://bugs.openjdk.java.net/browse/JDK-8219367
>
> Cheers,
>
> Leslie Zhai
>
> 在 2019/1/24 下午7:41, Wang Xue 写道:
>> Hi all,
>>
>> I found that the symbol "[ ]" is not matching when I use 
>> -XX:+PrintStubCode. Is it a typo?
>>
>> the output:
>> $ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintStubCode -version
>>
>> StubRoutines::forward exception [0x00007f73548a47a0, 0x00007f73548a48e4[
>> (324 bytes)
>> StubRoutines::call_stub [0x00007f73548a48e4, 0x00007f73548a4c22[ (830 
>> bytes)
>> StubRoutines::catch_exception [0x00007f73548a4c22, 0x00007f73548a4e03[
>> (481 bytes)
>> StubRoutines::atomic_xchg [0x00007f73548a4e03, 0x00007f73548a4e08[ (5 
>> bytes)
>> StubRoutines::atomic_xchg_long [0x00007f73548a4e08, 0x00007f73548a4e0f[
>> (7 bytes)
>> StubRoutines::atomic_cmpxchg [0x00007f73548a4e0f, 0x00007f73548a4e16[ (7
>> bytes)
>> StubRoutines::atomic_cmpxchg_byte [0x00007f73548a4e16,
>> 0x00007f73548a4e20[ (10 bytes)
>> StubRoutines::atomic_cmpxchg_long [0x00007f73548a4e20,
>> 0x00007f73548a4e29[ (9 bytes)
>> StubRoutines::atomic_add [0x00007f73548a4e29, 0x00007f73548a4e32[ (9 
>> bytes)
>> ...
>>
>>
>> I made a small change to match "[ ]":
>>
>>
>> diff -r b2d1c3b0bd31 src/hotspot/share/runtime/stubCodeGenerator.cpp
>> --- a/src/hotspot/share/runtime/stubCodeGenerator.cpp   Wed Jan 23
>> 13:40:09 2019 +0100
>> +++ b/src/hotspot/share/runtime/stubCodeGenerator.cpp   Thu Jan 24
>> 19:04:39 2019 +0800
>> @@ -60,7 +60,7 @@
>>     st->print("%s", group());
>>     st->print("::");
>>     st->print("%s", name());
>> -  st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)",
>> p2i(begin()), p2i(end()), size_in_bytes());
>> +  st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (%d bytes)",
>> p2i(begin()), p2i(end()), size_in_bytes());
>>   }
>>
>>   // Implementation of StubCodeGenerator
>>
>>
>> Could someone help to review the small change?
>>
>> Thanks,
>> Wang Xue
>>
>>
>



More information about the hotspot-runtime-dev mailing list