pub struct BehaviorFilter { /* private fields */ }Expand description
The behavior filter - tracks and analyzes allocation patterns.
Implementations§
Source§impl BehaviorFilter
impl BehaviorFilter
Sourcepub fn with_thresholds(thresholds: BehaviorThresholds) -> Self
pub fn with_thresholds(thresholds: BehaviorThresholds) -> Self
Create with custom thresholds.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if enabled.
Sourcepub fn set_thresholds(&mut self, thresholds: BehaviorThresholds)
pub fn set_thresholds(&mut self, thresholds: BehaviorThresholds)
Set thresholds.
Sourcepub fn thresholds(&self) -> &BehaviorThresholds
pub fn thresholds(&self) -> &BehaviorThresholds
Get current thresholds.
Sourcepub fn record_alloc(
&self,
ptr: *const u8,
tag: &'static str,
kind: AllocKind,
size: usize,
)
pub fn record_alloc( &self, ptr: *const u8, tag: &'static str, kind: AllocKind, size: usize, )
Record an allocation.
Sourcepub fn record_free(
&self,
ptr: *const u8,
tag: &'static str,
kind: AllocKind,
size: usize,
)
pub fn record_free( &self, ptr: *const u8, tag: &'static str, kind: AllocKind, size: usize, )
Record a deallocation.
Sourcepub fn record_promotion(&self, tag: &'static str, from_kind: AllocKind)
pub fn record_promotion(&self, tag: &'static str, from_kind: AllocKind)
Record a promotion.
Sourcepub fn record_survival(
&self,
tag: &'static str,
kind: AllocKind,
frames_alive: u64,
)
pub fn record_survival( &self, tag: &'static str, kind: AllocKind, frames_alive: u64, )
Record frame survival (called at frame end for surviving allocations).
Sourcepub fn current_frame(&self) -> u64
pub fn current_frame(&self) -> u64
Get current frame number.
Sourcepub fn analyze(&self) -> BehaviorReport
pub fn analyze(&self) -> BehaviorReport
Analyze behavior and generate report.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BehaviorFilter
impl !RefUnwindSafe for BehaviorFilter
impl !Send for BehaviorFilter
impl !Sync for BehaviorFilter
impl Unpin for BehaviorFilter
impl UnwindSafe for BehaviorFilter
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