Loading... (original) (raw)
We now have SafepointTimeout machinery, that covers the "synchronization" part of the safepoint, i.e. the phase where threads are coming to a safepoint. But some use cases would enjoy the JVM mode where it exits if the _entire_ synchronized-at-safepoint, including the execution of associated VM operations, was handled by timeout machinery.
Since VMThread is blocked executing the actual VM operation, it makes sense to use the existing periodic tasks / WatcherThread machinery to sample for safepoint, and act accordingly. It seems that if we are timeout-ing in the middle of VM operation, no recovery action is possible, and the only option is to crash JVM hard, hoping the deployment handles this properly.
Example patch:
http://cr.openjdk.java.net/~shade/8181143/webrev.01/
Example output:
http://cr.openjdk.java.net/~shade/8181143/LongAlloc.java
http://cr.openjdk.java.net/~shade/8181143/g1.txt