Skip to main content

Module prof

Module prof 

Source
Expand description

Safe controls for mimalloc’s sampled heap profiler.

Structs§

ModuleInfo
One loaded module (shared library or the main executable), copied out of the OS module list by modules.
ProfStats
Snapshot of mi_prof_stats_get’s counters, translated from the raw sys struct into plain Rust types.
Sample
One sampled call stack, copied out of the profiler by samples.

Functions§

dump_file
dump_proto_file
Write the current heap profile to path in profile.proto format.
dump_proto_to_vec
Serialize the current heap profile as a binary pprof profile.proto Profile message (see google/pprof’s profile.proto), without holding the profiler lock.
dump_to_vec
Serialize the current heap profile without holding the profiler lock.
is_enabled
modules
Enumerate the process’s loaded modules (shared libraries and the main executable), e.g. to build pprof Mapping entries yourself.
reset
samples
Collect a point-in-time copy of every live sampled stack.
start
stats
Read the profiler’s current counters via mi_prof_stats_get.
stop