RFR: 8261268: LOAD_INSTANCE placeholders unneeded for parallelCapable class loaders
Coleen Phillimore
coleenp at openjdk.java.net
Tue Feb 9 13:27:35 UTC 2021
On Tue, 9 Feb 2021 12:30:07 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/classfile/systemDictionary.cpp line 594:
>>
>>> 592: // and has not yet finished.
>>> 593: // In both cases the original caller will clean up the placeholder
>>> 594: // entry on error.
>>
>> Is this commentary really no longer applicable? While I don't fully understand it it does indicate the general conditions under which we will call handle_parallel_super_load.
>
> I'm in progress of investigating why this code exists. The last two lines were false, and these lines seem to repeat the comments above handle_parallel_super_load. Pointing out java.lang.instrument is even more befuddling. There may have been a case once where two threads tried to load the same class in RedefineClasses. I'm not sure why the LOAD_INSTANCE wouldn't have stopped them, just like it stops all classes from being duplicate loaded. In any case, today RedefineClasses now locks loading the same class with the RedefineClasses_lock.
The second sentence of this comment seems correct but is repeated above handle_parallel_super_load. I was going to restore some of this but it doesn't add any information that isn't in the comment above this function.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2469
More information about the hotspot-runtime-dev
mailing list