RFR: 8331572: Allow using OopMapCache outside of STW GC phases [v2]

Coleen Phillimore coleenp at openjdk.org
Thu May 16 17:50:02 UTC 2024


On Thu, 16 May 2024 15:26:25 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/interpreter/oopMapCache.cpp line 584:
>> 
>>> 582:         MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
>>> 583:         Service_lock->notify_all();
>>> 584:       }
>> 
>> Yes, you don't want to do this too frequently.
>
> Well, tests pass with this change, but now I am thinking if we would eventually run into any lock ranking problem here. At very least `stackwatermark` is ranked above `service`, so we are safe for concurrent GCs. There are only a few locks that are ranked below `service`, so maybe I am overthinking this?

It is a low level lock, I think it'll be ok, you could check out some call stacks but the tests should find these lock inversions if they exist (famous last words).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19229#discussion_r1603789260


More information about the shenandoah-dev mailing list