RFR: 8146705: Improve JVMCI support for blocking compilation

Doug Simon doug.simon at oracle.com
Mon Jan 11 13:18:50 UTC 2016


The CompileBroker currently uses a simple timeout of 1 second when waiting for a blocking JVMCI compilation to complete. This approach is too simple. JVMCI compiler threads themselves flood the compilation queues with compilation requests; such compilations cannot be blocking (the JVMCI compiler can easily cause the system to deadlock). This flooding means that application submitted tasks often timeout before the tasks even start compiling. 
Once a JVMCI thread starts compiling a task, there is still the risk of it deadlocking. The current timeout mechanism needs to be augmented with a test of the compiler thread's state. As long as it's not blocked for too long, we know the compiler is making progress and will eventually complete.

This review is for changes that address the above issues as follows: 

1. Non-blocking tasks are selected before blocking tasks from the compilation queue. 
2. A thread waiting for a compilation task to complete checks the state of the compiler thread periodically (500ms intervals). If 5 successive checks see a blocked thread, the compilation times out and the waiting thread is unblocked.

https://bugs.openjdk.java.net/browse/JDK-8146705
http://cr.openjdk.java.net/~dnsimon/8146705/

-Doug


More information about the hotspot-compiler-dev mailing list