> 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.

Chris Plummer has updated the pull request incrementally with three additional 
commits since the last revision:

 - Minor cleanup of output
 - Don't assert if the address is in the G1 heap, but not in an region. Not all 
of the mapped part of the heap is in  use by regions.
 - Fix isInRegion() to check the entire region, not just the in use part.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/17691/files
  - new: https://git.openjdk.org/jdk/pull/17691/files/6da5b903..37b3f17b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17691&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17691&range=00-01

  Stats: 8 lines in 3 files changed: 2 ins; 0 del; 6 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

Reply via email to