pub fn samples() -> Vec<Sample>Expand description
Collect a point-in-time copy of every live sampled stack.
This snapshots under the profiler lock via mi_prof_snapshot_new,
then walks and frees the snapshot outside that lock. Using
mi_prof_visit directly here would run the (allocating) collection
below from inside the visitor while the profiler lock is held,
risking reentrant profiler-hook allocation and deadlock — the
reentrancy hazard the snapshot API exists to avoid (issue #2,
decisions 11-13).