RFR: 8272447: Remove 'native' ranked Mutex [v2]

Thomas Stuefe stuefe at openjdk.java.net
Thu Aug 19 15:25:26 UTC 2021


On Thu, 19 Aug 2021 14:21:54 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> test/hotspot/gtest/metaspace/test_is_metaspace_obj.cpp line 52:
>> 
>>> 50: 
>>> 51:   void do_test(Metaspace::MetadataType mdType) {
>>> 52:     _lock = new Mutex(Monitor::leaf, "gtest-IsMetaspaceObjTest-lock", false, Monitor::_safepoint_check_never);
>> 
>> Again I'm not at all clear on the basis for changing from the low ranked native to a much higher ranked leaf. ??
>
> @tstuefe  can probably answer why he picked native.  I assume it was due to availability and that it was a test. I don't think we want tests to be out of the mutex ranking system and deadlock either.  'leaf' didn't deadlock as the other metaspace locks are no-safepoint locks and below leaf.

Yes, it seemed easiest at the time. Replacing it with a ranked mutex is fine.

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

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


More information about the hotspot-runtime-dev mailing list