safepoint
Safepoints: Meaning, Side Effects and Overheads
Counted/Uncounted loops, Safepoints and OSR Compilation
JVM的Stop The World,安全点,黑暗的地底世界
When at a safepoint, the thread’s representation of it’s Java machine state is well described, and can be safely manipulated and observed by other threads in the JVM.
安全点是指线程执行过程中一些特定的位置,在这些位置上线程的JVM状态是确定的(JIT会在safepoint上生成OopMap帮助确定GC Roots),因此可以进行GC等操作
safepoint日志
打印日志
-XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1
-XX:+PrintGCApplicationStoppedTime #打印停顿时间