Skip to main content

Module dhat

Module dhat 

Source
Expand description

Exact DHAT v2 heap/lifetime profiling controls.

DHAT records every non-internal allocation from the moment [start] succeeds. It is intended for short diagnostic runs and tests rather than continuous production telemetry. The generated JSON opens in the standard Valgrind dh_view.html viewer. It is independent of sampled prof profiling and of mi_memory_set_callbacks.

Structs§

Stats
Snapshot of exact DHAT collector state.

Functions§

dump_file
Serialize the current or stopped measurement window as a DHAT v2 JSON file.
is_enabled
Whether exact DHAT tracking is currently active.
start
Start exact allocation/lifetime tracking. Returns false if it is already active.
stats
Read the collector’s exact counters. Returns a zero/default snapshot only if the linked C library rejected the versioned ABI structure.
stop
Stop observing allocation events. Retained records remain available to dump_file so a caller can stop a measurement window before serializing its report.