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

Wang Xue wangxue at loongson.cn
Thu Jan 24 11:41:30 UTC 2019


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