D4rtDiag class

Lightweight, always-on interpreter instrumentation counters.

These are plain integer increments on the hottest interpreter paths — no allocation, no stack capture — so they are safe to leave compiled in. They exist to diagnose pathological per-frame cost in embeddings (e.g. the particle_field Flutter sample freeze): a harness reads callCount / maxDepth before and after a unit of work to see whether a spike is driven by call volume or interpreter recursion depth (the latter is what makes exception-based return unwinding expensive — see the perf analysis).

Constructors

D4rtDiag()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

bridgedAllocs int
Count of BridgedInstance objects constructed in the window.
getter/setter pair
callCount int
Monotonic count of interpreted function-call entries (_callImpl).
getter/setter pair
closureAllocs int
Count of interpreted-closure objects materialized in the window.
getter/setter pair
depth int
Current synchronous interpreter call-nesting depth.
getter/setter pair
envAllocs int
Per-window allocation counters for the prime per-rebuild garbage suspects. The particle_field freeze is a stop-the-world major GC of ~2.2GB old-gen garbage accumulated at ~22MB/frame; these counters localize which interpreter allocation dominates a single interpreted rebuild.
getter/setter pair
instanceAllocs int
Count of InterpretedInstance objects constructed in the window.
getter/setter pair
maxDepth int
High-water mark of depth since the last reset.
getter/setter pair

Static Methods

enterCall() → void
Records entry into an interpreted call frame.
exitCall() → void
Records exit from an interpreted call frame.
reset() → void
Resets the windowed counters (callCount, maxDepth, and the allocation counters). depth is the live nesting level and is intentionally left untouched.