RFR: 8253909: Implement detailed map file for CDS [v2]

Thomas Stuefe stuefe at openjdk.java.net
Tue Oct 6 06:48:46 UTC 2020


On Mon, 5 Oct 2020 18:26:55 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> For analyzing the contents of a CDS archive, we need a "map file" that describes the archive in different levels of
>> detail. This can be done using unified logging. E.g.,
>> java -Xshare:dump -Xlog:cds+map=trace:file=cds.map:none:filesize=0
>> 
>> For example, we can use the map file for troubleshooting [JDK-8253495](https://bugs.openjdk.java.net/browse/JDK-8253495)
>> (runtime/cds/DeterministicDump.java broken). We can diff two different cds.map files to see where the non-deterministic
>> contents come from.
>> See attachments in [JDK-8253909](https://bugs.openjdk.java.net/browse/JDK-8253909) for example map files at the
>> info/debug/trace levels.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Feedback from Thomas Stuefe

Changes requested by stuefe (Reviewer).

src/hotspot/share/memory/filemap.cpp line 301:

> 299:   st->print_cr("- ptrmap_size_in_bits:            " SIZE_FORMAT, _ptrmap_size_in_bits);
> 300: }
> 301:

Great, thank you!

src/hotspot/share/runtime/os.hpp line 693:

> 691:   static void print_hex_dump(outputStream* st, address start, address end, int unitsize) {
> 692:     print_hex_dump(st, start, end, unitsize, /*bytes_per_line=*/16, /*logical_start=*/start);
> 693:   }

This is a bit unclear. Could we do it like this instead:

// Print a hex dump from [start .. end). Output lines are prefixed with addresses.
static void print_hex_dump(outputStream* st, address start, address end, int unitsize)


// Print a hex dump from [base+start .. base+end). Output lines are prefixed with offset in relation to base.
static void print_hex_dump(outputStream* st, address base, intx start, intx end, int unitsize)

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

PR: https://git.openjdk.java.net/jdk/pull/474


More information about the hotspot-runtime-dev mailing list