Sampling Thread Dump Exceptions Synchronization Threshold File I/O Threshold Socket I/O Threshold Heap Statistics Class Loading Allocation Profiling Enforces Safepoints May be slow if there are many exceptions Set low threshold for profiling Enforces Full GC
Stop The World JVM can suspend thread on in discrete points of execution Flight Recorder Threads sampled during execution of Java code No Safepoints / No Stop The World No samples is thread is not running!
Java Flight Recorder SJK (JMX sampling) perf * * https://github.com/jvm-profiling-tools/perf-map-agent Total samples 5653 100.00% ZIP 2659 47.04% Other 2994 52.96% Total samples 2905 100.00% ZIP 2870 98.80% Other 35 1.20% Total samples 59896 100.00% ZIP 54771 91.44% Other 5125 8.56%
instruction Expensive! Interfere JVM optimizations Flight Recorder Fast path – Object allocated from TLAB Slow path – new TLAB have to be allocated Sample on slow path (every few hundreds of kB) Non uniform sampling (TLAB size is dynamic) Sampled