RFR: 8276126: Dump time class transformation causes heap objects of non-boot classes to be archived [v3]
Ioi Lam
iklam at openjdk.java.net
Tue Nov 30 04:02:09 UTC 2021
On Tue, 30 Nov 2021 00:10:47 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> During CDS static dump, if a class loaded by a boot class loader is transformed by a java agent, the transformed class is mistakenly identified as a class loaded by a custom loader. This would cause archiving of the heap objects to fail.
>>
>> The proposed patch corrects the identification of the transformed class and will not include it in the archive.
>> Also, if a transformed class is detected during dump time, the archiving of the heap objects will be disabled.
>>
>> Testing: Oracle CI tiers 1-3, tier4 in progress.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>
> Simplify the fix by passing a 'redefined' flag from KlassFactory::create_from_stream() to ClassLoader::record_result()
LGTM. One small nit about unused parameter.
src/hotspot/share/classfile/classLoaderExt.cpp line 233:
> 231:
> 232: void ClassLoaderExt::record_result(const s2 classpath_index, InstanceKlass* result,
> 233: const ClassFileStream* stream, bool redefined) {
The `stream` argument is not used.
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6484
More information about the hotspot-runtime-dev
mailing list