Package io.deephaven.hotspot
Class JvmIntrospectionContext
java.lang.Object
io.deephaven.hotspot.JvmIntrospectionContext
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:
- Deoptimization
- Biased lock revocation
- Thread dump
- Heap inspection
- Class redefinition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Number of safepoint pauses between the last two calls tosample()
long
Time in milliseconds fully paused in safepoints between the last two calls tosample()
long
Time in milliseconds getting to a full safepoint stop (safepoint sync time) between the last two calls tosample()
void
Sample garbage collection count and times at the point of call.boolean
void
-
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 tosample()
- Returns:
- Number of safepoint pauses.
-
deltaSafePointPausesTimeMillis
public long deltaSafePointPausesTimeMillis()Time in milliseconds fully paused in safepoints between the last two calls tosample()
- Returns:
- Time in milliseconds.
-
deltaSafePointSyncTimeMillis
public long deltaSafePointSyncTimeMillis()Time in milliseconds getting to a full safepoint stop (safepoint sync time) between the last two calls tosample()
- Returns:
- Time in milliseconds
-