RFR (S) 8230003: Make Monitor inherit from Mutex

David Holmes david.holmes at oracle.com
Thu Aug 22 06:45:33 UTC 2019


Hi Coleen,

On 22/08/2019 12:52 pm, coleen.phillimore at oracle.com wrote:
> Summary: Reverse inheritance that makes more sense.
> 
> See bug for more description.  Tested with hs-tier1-3 with 
> linux-x64-debug and hs-tier1 on Oracle platforms.
> 
> open webrev at http://cr.openjdk.java.net/~coleenp/2019/8230003.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8230003

src/hotspot/share/runtime/interfaceSupport.inline.hpp

!   Mutex** _in_flight_monitor_adr;

It looks a little odd to still have "monitor" in the local variable and 
thread field name. That's another 18 changes to make. Separate cleanup okay.

---

src/hotspot/share/runtime/mutex.hpp

// The default length of monitor name was originally chosen to be 64 to 
avoid
// false sharing. Now, PaddedMonitor is available for this purpose.
// TODO: Check if _name[MONITOR_NAME_LEN] should better get replaced by 
const char*.
static const int MONITOR_NAME_LEN = 64;

s/monitor/mutex throughout?

---

src/hotspot/share/runtime/mutex.cpp

       log_trace(vmmonitor)("JavaThread " INTPTR_FORMAT " on %d attempt 
trying to acquire vmmonitor %s", p2i(self), retry_cnt, _name);

There's only a single logging line in all the mutex/monitor code. Is it 
worth changing vmmonitor to vmmutex ?

Thanks,
David
-----

> Thanks,
> Coleen
> 
> 
> *
> *


More information about the hotspot-runtime-dev mailing list