RFR: 8273915: Create 'nosafepoint' rank
Coleen Phillimore
coleenp at openjdk.java.net
Mon Sep 20 13:29:47 UTC 2021
On Mon, 20 Sep 2021 00:08:11 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Partition safepoint checking and nonchecking lock ranks. The nonchecking locks are always lower ranked than the safepoint checking locks because they cannot block.
>>
>> This moves some leaf locks to 'nosafepoint' rank and corrects relative ranking.
>>
>> Tested with tier1-6 and built and run tier1 tests with shenandoah locally.
>
> src/hotspot/share/gc/parallel/psCompactionManager.cpp line 95:
>
>> 93: _shadow_region_array = new (ResourceObj::C_HEAP, mtGC) GrowableArray<size_t >(10, mtGC);
>> 94:
>> 95: _shadow_region_monitor = new Monitor(Mutex::nosafepoint, "CompactionManager_lock",
>
> Not clear why this one needed to change??
This one changes because 'barrier' is above 'leaf' which checks for safepoint. nosafepoint it the top rank that doesn't check for safepoint, so this was made nosafepoint.
> src/hotspot/share/runtime/mutex.hpp line 55:
>
>> 53: nosafepoint = oopstorage + 6,
>> 54: leaf = nosafepoint + 6,
>> 55: safepoint = leaf + 10,
>
> It is somewhat confusing to have safepoint as an explicit rank now that all ranks above nosafepoint imply safepoint-ing.
I thought there was still a lock that used this rank but there isn't, so I'll remove it.
> src/hotspot/share/runtime/mutexLocker.cpp line 253:
>
>> 251: def(ClassInitError_lock , PaddedMonitor, leaf+1, true, _safepoint_check_always);
>> 252: def(Module_lock , PaddedMutex , leaf+2, false, _safepoint_check_always);
>> 253: def(InlineCacheBuffer_lock , PaddedMutex , nosafepoint-1, true, _safepoint_check_never);
>
> Why -1 ?
It depends on CompiledIC_lock
def(CompiledIC_lock , PaddedMutex , nosafepoint, _safepoint_check_never, true);
-------------
PR: https://git.openjdk.java.net/jdk/pull/5550
More information about the serviceability-dev
mailing list