RFR: 8314508: Improve how relativized pointers are printed by frame::describe
Fredrik Bredberg
fbredberg at openjdk.org
Mon Mar 4 12:39:12 UTC 2024
The output from frame::describe has been improved so that it now prints the actual derelativized pointer value, regardless if it's on the stack or on the heap. It also clearly shows which members of the fixed stackframe are relativized. See sample output of a riscv64 stackframe below:
[6.693s][trace][continuations] 0x000000409e14cc88: 0x00000000eeceaf58 locals for #10
[6.693s][trace][continuations] local 0
[6.693s][trace][continuations] oop for #10
[6.693s][trace][continuations] 0x000000409e14cc80: 0x00000000eec34548 local 1
[6.693s][trace][continuations] oop for #10
[6.693s][trace][continuations] 0x000000409e14cc78: 0x00000000eeceac58 local 2
[6.693s][trace][continuations] oop for #10
[6.693s][trace][continuations] 0x000000409e14cc70: 0x00000000eee03eb0 #10 method java.lang.invoke.LambdaForm$DMH/0x0000000050001000.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)V @ 10
[6.693s][trace][continuations] - 3 locals 3 max stack
[6.693s][trace][continuations] - codelet: return entry points
[6.693s][trace][continuations] saved fp
[6.693s][trace][continuations] 0x000000409e14cc68: 0x00000040137dc790 return address
[6.693s][trace][continuations] 0x000000409e14cc60: 0x000000409e14ccf0
[6.693s][trace][continuations] 0x000000409e14cc58: 0x000000409e14cc60 interpreter_frame_sender_sp
[6.693s][trace][continuations] 0x000000409e14cc50: 0x000000409e14cc00 interpreter_frame_last_sp (relativized: fp-14)
[6.693s][trace][continuations] 0x000000409e14cc48: 0x0000004050401a88 interpreter_frame_method
[6.693s][trace][continuations] 0x000000409e14cc40: 0x0000000000000000 interpreter_frame_mdp
[6.693s][trace][continuations] 0x000000409e14cc38: 0x000000409e14cbe0 interpreter_frame_extended_sp (relativized: fp-18)
[6.693s][trace][continuations] 0x000000409e14cc30: 0x00000000ef093110 interpreter_frame_mirror
[6.693s][trace][continuations] oop for #10
[6.693s][trace][continuations] 0x000000409e14cc28: 0x0000004050401c68 interpreter_frame_cache
[6.693s][trace][continuations] 0x000000409e14cc20: 0x000000409e14cc88 interpreter_frame_locals (relativized: fp+3)
[6.693s][trace][continuations] 0x000000409e14cc18: 0x0000004050401a7a interpreter_frame_bcp
[6.693s][trace][continuations] 0x000000409e14cc10: 0x000000409e14cc10 interpreter_frame_initial_sp (relativized: fp-12)
[6.693s][trace][continuations] 0x000000409e14cc08: 0x00000000eec34548
[6.693s][trace][continuations] 0x000000409e14cc00: 0x0000000000000000 locals for #9
[6.693s][trace][continuations] local 0
[6.693s][trace][continuations] oop for #9
[6.693s][trace][continuations] 0x000000409e14cbf8: 0x00000000eecf1370 local 1
[6.693s][trace][continuations] oop for #9
[6.693s][trace][continuations] 0x000000409e14cbf0: 0x00000000eecf1380 local 2
[6.693s][trace][continuations] oop for #9
[6.693s][trace][continuations] 0x000000409e14cbe8: 0x0000000000000000 local 3
[6.693s][trace][continuations] 0x000000409e14cbe0: 0x0000000000000000 local 4
[6.693s][trace][continuations] unextended_sp for #10
The output is was created by running `test/jdk/jdk/internal/vm/Continuation/Basic.java` with `-Xlog:continuations=trace:frbr_log.txt`.
Output has been reviewed for x64, aarch64, ppc64le and riscv64.
The changes also passes tier1-tier5.
-------------
Commit messages:
- 8314508: Improve how relativized pointers are printed by frame::describe
Changes: https://git.openjdk.org/jdk/pull/18102/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18102&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8314508
Stats: 10 lines in 1 file changed: 6 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/18102.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18102/head:pull/18102
PR: https://git.openjdk.org/jdk/pull/18102
More information about the hotspot-dev
mailing list