Uses Hotspot mbean to access the spent in and getting to safepoints.
To get information about compilation in Spectator, just setup registration of standard MXBeans. Note, if you are building an app at Netflix, then this should happen automatically via the normal platform initialization.
import com.netflix.spectator.jvm.Jmx; Jmx.registerStandardMXBeans(registry);
Timer reporting the amount of time the application has been stopped for safepoint operations.
Timer reporting the amount of time spent getting to safepoints.