pub trait JemallocProfCtlExt {
// Required methods
fn dump_stats(&mut self, json_format: bool) -> Result<String>;
fn stats(&self) -> Result<JemallocStats>;
fn pause(&self) -> Result<()>;
fn resume(&self) -> Result<()>;
}Required Methods§
fn dump_stats(&mut self, json_format: bool) -> Result<String>
fn stats(&self) -> Result<JemallocStats>
Sourcefn pause(&self) -> Result<()>
fn pause(&self) -> Result<()>
Pauses allocation sampling by clearing jemalloc’s prof.active mallctl.
Unlike JemallocProfCtl::deactivate, this leaves prof.reset
untouched, so the profile accumulated so far and the profiling metadata
(start time, sample rate) survive. Pair with resume to
keep extending the same profile. Use this to briefly stop sampling, for
example while capturing a CPU profile, without discarding the heap
profile collected so far. A caller that intends to start a fresh profile
wants JemallocProfCtl::deactivate instead.
Takes &self deliberately: pausing does not touch the tracked metadata,
only the global mallctl.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".