<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 7/27/22 2:25 PM, Ashutosh Mehra
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAKt0pyTdX=QcfWNXBfyxh__sD-HWgB1cU7=ReM0zMry82bYW1g@mail.gmail.com">
<div dir="ltr">Hi Calvin,
<div><br>
</div>
<div>Thanks for the option. "-XX:+PrintSharedArchiveAndExit" is
what I was looking for.</div>
<div>btw it looks like the PrintSharedDictionary flag is
redundant, I guess PrintSharedArchiveAndExit already covers
it.</div>
<div>I don't see PrintSharedDictionary being checked anywhere in
the code base.</div>
</div>
</blockquote>
<p>You're correct. I only see the flag declared in globals.hpp.</p>
<p>./share/runtime/globals.hpp: product(bool,
PrintSharedDictionary, false, \</p>
<p>In 8u, one needs to specify -XX:+PrintSharedDictionary in order
to display the class names in a CDS archive. I haven't looked into
since which release the processing of the flag was removed.</p>
<p>Anyway, I've file <a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8291443">https://bugs.openjdk.org/browse/JDK-8291443</a> to
clean it up.</p>
thanks,<br>
Calvin
<p><br>
</p>
<blockquote type="cite" cite="mid:CAKt0pyTdX=QcfWNXBfyxh__sD-HWgB1cU7=ReM0zMry82bYW1g@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>Regards,<br clear="all">
<div>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">Ashutosh Mehra</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jul 27, 2022 at 5:02
PM <<a href="mailto:calvin.cheung@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">calvin.cheung@oracle.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
Ashutosh,<br>
<br>
You can list the contents of the classes.jsa by doing:<br>
<br>
java -XX:+PrintSharedArchiveAndExit -XX:+PrintSharedDictionary<br>
<br>
If you have your own CDS archive, you can specify it using the
<br>
-XX:SharedArchiveFile option as follows:<br>
<br>
java -XX:+PrintSharedArchiveAndExit -XX:+PrintSharedDictionary
<br>
-XX:SharedArchiveFile=<CDS archive><br>
<br>
Calvin<br>
<br>
<br>
On 7/27/22 10:48 AM, Ashutosh Mehra wrote:<br>
> Hi,<br>
> I am wondering if there is any way to peek into the CDS
archive and <br>
> look into its contents. I believe a tool that dumps the
list of <br>
> classes in the archive would be really helpful.<br>
><br>
> Regards,<br>
> Ashutosh Mehra<br>
<br>
</blockquote>
</div>
</blockquote>
</body>
</html>