pub fn begin_deep_profiling() -> Option<DeepProfilingSession>Available on crate feature
debug-control only.Expand description
Ask for samples, for as long as the returned guard is held.
None when the profile does not permit sampling. The first consumer starts
an empty capture window, so no section can enter it carrying a sample from
the last one, and the last guard to drop releases the sample storage rather
than parking it for a consumer that may never return.
The guard is returned rather than exposing start()/stop() so an early
return or a panic cannot leave the collectors running for the life of the
process.