This PR adds G1 support to PointerFinder/PointerLocation. Previously we only had SerialGC support. Previously for G1 addresses SA would only report that the address is "In unknown section of Java heap" with no other details. Now it provides details for G1 addresses. Here are some examples for clhsdb `threadcontext` output. `threadcontext` dumps the contents of the thread's registers, some of which are often in the java heap. In the output below the first line is without verbose output and the 2nd is with:
rbp: 0x00000000a0004080: In G1 heap region rbp: 0x00000000a0004080: In G1 heap Region: 0x00000000a0000000,0x00000000a0018a30,0x00000000a1000000:Old I also added an improvement to how SA deals with addresses in the TLAB. It used to only report that the address is in a TLAB and provide details about the TLAB in verbose mode. Now if verbose mode is used, the heap region information is included after the TLAB information. Here again is an example without and with verbose output: rsi: 0x0000000166000000: In TLAB for thread "main" sun.jvm.hotspot.runtime.JavaThread@0x00007f11c8029250 rsi: 0x0000000166000000: In TLAB for thread ("main" #1 prio=5 tid=0x00007f11c8029250 nid=1503 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE JavaThread state: _thread_in_java ) [0x0000000166000000,0x00000001662d0c90,0x00000001667ffdc0,{0x0000000166800000}) In G1 heap Region: 0x0000000166000000,0x0000000166800000,0x0000000167000000:Eden Note at the end it indicates the address is in the Eden space, which is probably always the case for G1 TLAB addresses. For SerialGC is shows something similar. rsi: 0x0000000088ff99e0: In TLAB for thread "main" sun.jvm.hotspot.runtime.JavaThread@0x00007f0544029110 rsi: 0x0000000088ff99e0: In TLAB for thread ("main" #1 prio=5 tid=0x00007f0544029110 nid=3098 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE JavaThread state: _thread_in_java ) [0x0000000088ff99e0,0x000000008978c090,0x0000000089ae54b0,{0x0000000089ae56f0}) In heap new generation: eden [0x0000000080200000,0x0000000089ae56f0,0x00000000a2420000) space capacity = 572653568, 27.99656213789626 used from [0x00000000a6860000,0x00000000a6860030,0x00000000aaca0000) space capacity = 71565312, 6.707160027472528E-5 used to [0x00000000a2420000,0x00000000a2420000,0x00000000a6860000) space capacity = 71565312, 0.0 used Testing all svc test in tier1, tier2, and tier5. Currently in progress. ------------- Commit messages: - Add G1 support to PointerFinder and PointerLocation. Changes: https://git.openjdk.org/jdk/pull/17691/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17691&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8323681 Stats: 70 lines in 4 files changed: 54 ins; 6 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/17691.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17691/head:pull/17691 PR: https://git.openjdk.org/jdk/pull/17691