RFR (S): 8228858: Reimplement JVM_RawMonitors to use PlatformMutex

Daniel D. Daugherty daniel.daugherty at oracle.com
Wed Aug 14 15:02:46 UTC 2019


On 8/14/19 8:32 AM, David Holmes wrote:
> bug: https://bugs.openjdk.java.net/browse/JDK-8228858
> webrev: http://cr.openjdk.java.net/~dholmes/8228858/webrev/

src/hotspot/share/prims/jvm.cpp
     No comments.

src/hotspot/share/runtime/mutex.cpp
     No comments.

src/hotspot/share/runtime/mutex.hpp
     L55:   // The rank native was only for use in Mutex's created by 
JVM_RawMonitorCreate,
         nit typo: s/Mutex's/Mutexes/
         (Not your typo, but...)

src/hotspot/share/runtime/park.cpp
     No comments.

Thumbs up. No need to see a new webrev if you decide to fix the typo.

Dan


>
> A JVM_RawMonitor  (not to be confused with JvmtiRawMonitor) is a 
> simple mutex (despite the name) currently implemented via two special 
> entry points in the VM Monitor code. This fix changes that so that a 
> JVM_RawMonitor is just a PlatformMutex, enabling us to delete the 
> special Monitor code.
>
> There are two clients of JVM_RawMonitor:
> - the native Zip library provided by the JDK and used by the JVM 
> during classloading
> - AWT debug code
>
> The first should be tested by using the VM. :) The second I don't 
> know. But the functionality we're testing is already present so 
> there's sufficient coverage just by testing one client.
>
> Testing: tiers 1 - 3 on Linux/macOS/Window x64, Solaris sparcv9
>
> Thanks,
> David



More information about the hotspot-runtime-dev mailing list