RFR: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms [v2]
Robbin Ehn
rehn at openjdk.org
Tue Feb 21 10:11:34 UTC 2023
On Mon, 20 Feb 2023 13:34:50 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> src/hotspot/share/classfile/systemDictionary.cpp line 1505:
>>
>>> 1503: // Add to systemDictionary - so other classes can see it.
>>> 1504: // Grabs and releases SystemDictionary_lock
>>> 1505: update_dictionary(THREAD, k, loader_data);
>>
>> All these patterns are the same in class loading, except here we update the SystemDictionary after deoptimizing holding the Compile_lock and in your change we update it beforehand.
>> I was going to suggest future cleanup of moving add_to_hierarchy and the associated deopt_scope code to InstanceKlass, but now I'm not sure if this order matters.
>> Holding the Compile_lock while adding a class to the SystemDictionary and the code to hold the Compile_lock in ciEnv::get_klass_by_name() now doesn't make sense to me. Klass is read lock free in the dictionary and temporarily holding the Compile_lock doesn't seem to do what it says:
>> ```
>> { // Grabbing the Compile_lock prevents systemDictionary updates
>> // during compilations.
>>
>>
>> At any rate, I think the SystemDictionary might need to be updated after deoptimization is done. Can you check this?
>
> Ok
Please see new commit, thanks!
-------------
PR: https://git.openjdk.org/jdk/pull/12585
More information about the hotspot-dev
mailing list