RFR: 8340826: Should not send unload notification for scratch classes [v2]

Leonid Mesnik lmesnik at openjdk.org
Wed Oct 2 15:07:41 UTC 2024


On Wed, 2 Oct 2024 07:51:24 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   space added
>
> src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp line 487:
> 
>> 485:   assert(klass != nullptr, "invariant");
>> 486:   assert(_subsystem_callback != nullptr, "invariant");
>> 487:   if (klass->is_instance_klass() && InstanceKlass::cast(klass)->is_scratch_class()) {
> 
> This is not correct. The unloaded event is generated earlier, this part is the metadata system serializing the constants referenced in said event. The result would still be an event, but it would have missing constants, such as the klass name.
> 
> Can scratch klasses short-circuit the "external" unload paths in cases of scratch klasses (which are really only implementation details). There is a property in the classfile parser about "broadcasting" that we (jfr) use to only log a single IK instance when we replace an IK with another schema extended IK.
> 
> Logically there should only be one official instance of an IK.

Thanks for suggestion, I filed https://bugs.openjdk.org/browse/JDK-8341421

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21166#discussion_r1784731562


More information about the hotspot-runtime-dev mailing list