question: private static void removeLoopSafepoint ( StructuredGraph graph ) { LoopBeginNode loopBegin = findFirstLoop ( graph ) ; loopBegin . disableSafepoint ( ) ; }
target:  Remove the safepoint from the first loop in the test method, so only the safepoints on MonitorEnter and MonitorExit remain in the loop. That way, we can make sure it deopts inside the MonitorEnter by invalidating the code while holding the lock.