RFR (L, tedious) 8222811: Consolidate MutexLockerEx and MutexLocker

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Tue Apr 23 15:06:33 UTC 2019


Summary: Make MutexLocker be MutexLockerEx implementation, remove 
MutexLockerEx calls.  Also added wait_without_safepoint_check().

Also made safepoint_check_flag an enum, renamed MonitorLockerEx to 
MonitorLocker, removed MutexUnlockerEx, and fixed formatting where 
affected by this change.

There's a MutexLocker constructor with a Thread parameter that would 
actually be more performant if the thread is passed from the current 
context rather than calling Thread::current() in Monitor::lock.  I think 
the Thread parameter should be moved to first so that we can have 
MutexLocker look like the Handle constructor calls, for example.  I 
didn't make this change in this.

    MutexLocker ml(THREAD, Monitor_lock).

The interesting changes are in:

http://cr.openjdk.java.net/~coleenp/2019/8222811.01/webrev/src/hotspot/share/runtime/mutexLocker.hpp.udiff.html
http://cr.openjdk.java.net/~coleenp/2019/8222811.01/webrev/src/hotspot/share/runtime/mutex.hpp.udiff.html
http://cr.openjdk.java.net/~coleenp/2019/8222811.01/webrev/src/hotspot/share/runtime/mutex.cpp.udiff.html

The rest is pattern substitution.

Ran mach5 tier1-6 tests.

open webrev at http://cr.openjdk.java.net/~coleenp/2019/8222811.01/webrev
bug link https://bugs.openjdk.java.net/browse/JDK-8222811

Thanks!
Coleen




More information about the hotspot-dev mailing list