RFR: 8306460: Clear JVM_ACC_QUEUED flag on methods when dumping dynamic CDS archive [v2]

Coleen Phillimore coleenp at openjdk.org
Tue May 16 16:37:52 UTC 2023


On Mon, 15 May 2023 18:22:00 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

>> src/hotspot/share/oops/instanceKlass.cpp line 2602:
>> 
>>> 2600:   // clear all the flags/stats that shouldn't be in the archived version
>>> 2601: #if INCLUDE_JVMTI
>>> 2602:   set_is_being_redefined(false);
>> 
>> I think this should assert !is_scratch_class() and clear (?) is_redefined() also.  It's unfortunate that we can't just clear all the status flags here and in Method.
>
>> clear (?) is_redefined() also.
> 
> There is no such flag; did you mean `has_been_redefined`? Instead of clearing it, shouldn't it be an assert `!has_been_redefined()` as well?

I just looked at the code again.  I suppose you could be creating a dynamic archive while a class is being redefine before the safepoint that redefines it.  I also see the check that excludes has_been_redefined, so that doesn't need to be cleared.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13652#discussion_r1195426198


More information about the hotspot-dev mailing list