Class JvmIntrospectionContext


public class JvmIntrospectionContext extends Object
Utility class to facilitate obtaining data for safepoint pauses count and time between two points in code. A safepoint pause is a "stop the world, pause all threads" event in the HotSpot JVM. Note full Garbage Collection pauses are a dominant cause of safepoint pauses, but there are other triggers like:
  1. Deoptimization
  2. Biased lock revocation
  3. Thread dump
  4. Heap inspection
  5. Class redefinition
And others; you can see a full list here .
  • Constructor Details

    • JvmIntrospectionContext

      public JvmIntrospectionContext()
  • Method Details

    • hasSafePointData

      public boolean hasSafePointData()
    • startSample

      public void startSample()
    • endSample

      public void endSample()
      Sample garbage collection count and times at the point of call.
    • deltaSafePointPausesCount

      public long deltaSafePointPausesCount()
      Number of safepoint pauses between the last two calls to sample()
      Number of safepoint pauses.
    • deltaSafePointPausesTimeMillis

      public long deltaSafePointPausesTimeMillis()
      Time in milliseconds fully paused in safepoints between the last two calls to sample()
      Time in milliseconds.
    • deltaSafePointSyncTimeMillis

      public long deltaSafePointSyncTimeMillis()
      Time in milliseconds getting to a full safepoint stop (safepoint sync time) between the last two calls to sample()
      Time in milliseconds