RFR: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms [v4]
Robbin Ehn
rehn at openjdk.org
Thu Feb 23 12:50:20 UTC 2023
On Thu, 23 Feb 2023 01:21:51 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> src/hotspot/share/classfile/systemDictionary.cpp line 1620:
>>
>>> 1618: assert(k != nullptr, "just checking");
>>> 1619: if (Universe::is_fully_initialized()) {
>>> 1620: assert_locked_or_safepoint(Compile_lock);
>>
>> This serves no purpose given you just took out the lock. But it does raise the question as to whether the lock can/should always be taken out if called at a safepoint, or if the Universe is not yet fully initialized?
>
> I found one call to `add_to_hierarchy()` where we previously did not
> grab in `Compile_lock` in `vmClasses::resolve_shared_class()` and
> that call is made with this assert in place:
> ```assert(!Universe::is_fully_initialized(), "We can make short cuts only during VM initialization");```
>
> so it looks to me like we have a locking issue there (as in too early for locks).
I think you are taking about CDS dump process. It works fine taking the lock.
I think this was just some micro-optimization. But we should not mark and do deopt fixed that.
-------------
PR: https://git.openjdk.org/jdk/pull/12585
More information about the hotspot-dev
mailing list