RFR(S): 8061256: com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java timed out

Nils Eliasson nils.eliasson at oracle.com
Thu Nov 13 14:11:54 UTC 2014


Please review this small change.

1) Fixing a deadlock in diagnostic command dcmd print_compile_queues - 
between the CompileQueue_lock and safepointing. The CompileQueue_lock 
requires that we are not at a safepoint when taking it. Otherwise a 
java-thread that already holds the lock will block when trying to get 
another lock. In this specific case the compiler threads are Java 
threads, they take the CompileQueue_lock frequently and some time takes 
the CompileTaskAlloc_lock after that.

Fixing this by making the diagnostic command not request a safepoint,

2) Refactoring away the lock() accessor in CompileQueue and stating the 
lock explicitly. This removes an element of surprise and makes it easier 
understanding the code.

webrev: http://cr.openjdk.java.net/~neliasso/8061256/webrev.02/
bug: https://bugs.openjdk.java.net/browse/JDK-8061256

Nils Eliasson

More information about the hotspot-compiler-dev mailing list