public abstract class CloseableCounter extends Object implements DebugCloseable
AbstractKeys that can nest and need to split out accumulated and flat
values for some kind of counter-like measurement.| Modifier and Type | Field and Description |
|---|---|
protected org.graalvm.compiler.debug.AccumulatedKey |
counter |
protected DebugContext |
debug |
protected long |
nestedAmountToSubtract |
protected CloseableCounter |
parent |
protected long |
start |
VOID_CLOSEABLE| Modifier and Type | Method and Description |
|---|---|
void |
close() |
DebugContext |
getDebug()
Gets the debug context associated with this object.
|
protected void |
interceptDifferenceAccm(long difference)
A hook for subclasses.
|
protected void |
interceptDifferenceFlat(long difference)
A hook for subclasses.
|
protected final DebugContext debug
protected final CloseableCounter parent
protected final org.graalvm.compiler.debug.AccumulatedKey counter
protected final long start
protected long nestedAmountToSubtract
public DebugContext getDebug()
DebugCloseablegetDebug in interface DebugCloseableprotected void interceptDifferenceAccm(long difference)
CloseableCounter.close() of this accumulated
CloseableCounter.counter.difference - since the last invocation of this counter flatprotected void interceptDifferenceFlat(long difference)
CloseableCounter.close() of this flat CloseableCounter.counter.difference - since the last invocation of this counter flatpublic void close()
close in interface AutoCloseableclose in interface DebugCloseable