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:
(info = high level layout -- regions, etc)
java -Xshare:dump -Xlog:cds+map=info:file=cds.map:none:filesize=0
(debug = information about all metaspace objects)
java -Xshare:dump -Xlog:cds+map=debug:file=cds.map:none:filesize=0
(trace = values of every byte in the archive)
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
(runtime/cds/DeterministicDump.java broken). We can diff two different cds.map files to see where the non-deterministic contents come from.
See attachments for example contents of the map file.