Struct jemalloc_pprof::JemallocProfCtl
source · pub struct JemallocProfCtl { /* private fields */ }
Expand description
A handle to control jemalloc profiling.
Implementations§
source§impl JemallocProfCtl
impl JemallocProfCtl
sourcepub fn lg_sample(&self) -> size_t
pub fn lg_sample(&self) -> size_t
Returns the base 2 logarithm of the sample rate (average interval, in bytes, between allocation samples).
sourcepub fn get_md(&self) -> JemallocProfMetadata
pub fn get_md(&self) -> JemallocProfMetadata
Returns the metadata of the profiler.
sourcepub fn activate(&mut self) -> Result<(), Error>
pub fn activate(&mut self) -> Result<(), Error>
Activate the profiler and if unset, set the start time to the current time.
sourcepub fn deactivate(&mut self) -> Result<(), Error>
pub fn deactivate(&mut self) -> Result<(), Error>
Deactivate the profiler.
sourcepub fn dump_pprof(&mut self) -> Result<Vec<u8>>
pub fn dump_pprof(&mut self) -> Result<Vec<u8>>
Dump a profile in pprof format (gzipped protobuf) and return a buffer with its contents.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JemallocProfCtl
impl RefUnwindSafe for JemallocProfCtl
impl Send for JemallocProfCtl
impl Sync for JemallocProfCtl
impl Unpin for JemallocProfCtl
impl UnwindSafe for JemallocProfCtl
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more