RFR: 8273300: Check Mutex ranking during a safepoint [v4]

David Holmes dholmes at openjdk.java.net
Wed Sep 15 01:33:52 UTC 2021


On Mon, 13 Sep 2021 15:15:11 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/memory/universe.cpp line 1109:
>> 
>>> 1107:   }
>>> 1108:   if (should_verify_subset(Verify_CodeCache)) {
>>> 1109:     MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
>> 
>> Is this needed to allow the new rankings to work? And is this enabled by the _verify_in_progress change? If so I'd rather see all of that related stuff changed first in a separate RFE that can easily be independently backported.
>
> Yes, this is needed.  This verification is done during a safepoint, so we don't need this lock.  The CodeCache_lock has a vary low ranking and takes out VtableStubs_lock which is a higher ranking.  With this change, we do not take out the CodeCache_lock, so it's needed for this change.  I see no reason whatsoever to backport it though.

This isn't connected to the _verify_in_progress change, so that is fine.

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

PR: https://git.openjdk.java.net/jdk/pull/5467


More information about the shenandoah-dev mailing list