RFR(S):8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled

Nils Eliasson nils.eliasson at oracle.com
Mon Mar 14 11:20:47 UTC 2016


Hi,

Summary:
The test wasn't as robust as expected.

Solution:
Change the way we verify that we are having a un-blocking compilation:
First lock the compilation queue - no new compiles will be completed. 
Enqueue method for compilation. If the method is compiled blockingly - 
the java thread will hang since the compile can't complete as long as 
the compile queue is locked.

Use this to test the blocking functionality in three steps:
1) Verify that we are not blocking on target method as described.
2) Add compiler directive with instruction to block on target method - 
verify that it can be compiled on all levels. If it is not blocking it 
will eventually be stalled for a moment in the compiler queue and the 
test will fail.
3) Pop directive, and redo step one - verify that target method is not 
blocking.

Bug: https://bugs.openjdk.java.net/browse/JDK-8151796
Webrev:  http://cr.openjdk.java.net/~neliasso/8151796/werev.03/

Regards,
Nils Eliasson


More information about the hotspot-compiler-dev mailing list