RFR: 8283474: Include detailed heap object info in CDS map file
Ioi Lam
iklam at openjdk.java.net
Mon Mar 21 22:31:53 UTC 2022
The cds.map file produced by `java -Xshare:dump -Xlog:cds+map=trace:file=cds.map:none:filesize=0` is useful in diagnosing problems with deterministic CDS archive files, such as [JDK-8253495](https://bugs.openjdk.java.net/browse/JDK-8253495).
Currently, cds.map has information of each individual **metaspace object**. For example:
[ro region 0x00000008004ca000 - 0x0000000800c452e8 7844584 bytes]
0x00000008004ca000:
0x00000008004ca000: @@ Symbol 8 [Z
0x00000008004ca000: 5a5b0002e99effff
0x00000008004ca008: @@ Symbol 8 [C
0x00000008004ca008: 435b000299a9ffff
...
0x0000000800bcd838: @@ TypeArrayU1 16
0x0000000800bcd838: 3e00010000000006 0000000000000000
0x0000000800bcd848: @@ ConstMethod 104 java.lang.String java.lang.Object.toString()
0x0000000800bcd848: 0000000000000018 0000000800651da8 0000000000000000 000c00050000000d
0x0000000800bcd868: 0006001200250024 0006000100010002 ec0000b7590100bb 03b60002b60001b6
0x0000000800bcd888: b6ec0003b600e600 0003b60005b80004 05c000ffb00006b6 003b002400000000
0x0000000800bcd8a8: 000100000000003c
This RFE adds the following info into the cds.map file to describe the **heap objects**:
[closed heap region 0x00000007bf800000 - 0x00000007bf87e000 516096 bytes]
0x00000007bf800000: @@ Object [B
0x00000007bf800000: 00000003f021ab01 0000000000002090
0x00000007bf800010: @@ Object java.lang.String
0x00000007bf800010: 0000000d37cfa501 00000000000091d8 f7f0000000010100
...
-------------
Commit messages:
- 8283474: Include detailed heap object info in CDS map file
Changes: https://git.openjdk.java.net/jdk/pull/7895/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7895&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8283474
Stats: 77 lines in 3 files changed: 63 ins; 4 del; 10 mod
Patch: https://git.openjdk.java.net/jdk/pull/7895.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7895/head:pull/7895
PR: https://git.openjdk.java.net/jdk/pull/7895
More information about the hotspot-runtime-dev
mailing list