RFR: 8353225: Add a way to iterate Klass inside the loaded CDS archive
Thomas Stuefe
stuefe at openjdk.org
Thu Apr 3 15:18:18 UTC 2025
On Thu, 3 Apr 2025 12:51:40 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> There's only a small number of classes that have allocated instances in the CDS archive. I think it's better to build a table of these classes and create KLUT information for them.
>>
>> BTW, none of the classes in the `LambdaProxyClassDictionary` have allocated instances.
>>
>>
>> $ LOG=-Xlog:cds+map=trace,cds+map+oops=trace:file=cds.oops.txt:none:filesize=0
>> $ java -Xshare:dump $LOG
>> $ grep '@@ Object' cds.oops.txt | cut -b 44- | sed -e 's/ .*//g' | sort | uniq | wc
>> 79 79 2456
>> $ java -Xshare:dump $LOG -XX:+AOTClassLinking
>> $ grep '@@ Object' cds.oops.txt | cut -b 44- | sed -e 's/ .*//g' | sort | uniq | wc
>> 172 172 6068
>
> I wonder if you could generate the KLUT information when objects are allocated rather than eagerly when classes are loaded.
@coleenp Thank you. I think would even be worse; you'd pay at every allocation instead of at oop iteration time; the latter only pays when visiting liveset objects, ideally a tiny subset of those that had been allocated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24311#discussion_r2027235957
More information about the hotspot-runtime-dev
mailing list