RFR: 8185746: Remove Mutex destructor assertion

David Holmes david.holmes at oracle.com
Wed Aug 2 23:23:51 UTC 2017


Hi Kim,

On 3/08/2017 8:41 AM, Kim Barrett wrote:
> Please review this small change to improve the debugging experience
> when a mutex is destroyed in a bad state.
> 
> I've removed the assert in ~Mutex, which was making the same checks as
> in ~Monitor, but providing much less information.

Okay. Please can you add a comment to the ~Mutex noting that eg:

// Defer any state checking to ~Monitor
Mutex::~Mutex() { }

> Also, the ~Monitor assert now (carefully) includes the name in the
> error message, as that may also be very helpful information.

Good strategy watching for a potentially corrupted name!

Thanks,
David
-----

> CR:
> https://bugs.openjdk.java.net/browse/JDK-8185746
> 
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8185746/hotspot.00/
> 
> Testing:
> Destroyed a locked mutex and looked at the assert message.
> 
> 


More information about the hotspot-runtime-dev mailing list