pub struct DeoptTracker { /* private fields */ }Expand description
Tracks shape dependencies for JIT-compiled functions.
When a function is compiled with shape guards (e.g., guarding that an object has shape X for inline caching), the shape IDs it depends on are registered here. When a shape transition occurs, all functions that depend on the transitioning shape are invalidated.
Implementations§
Source§impl DeoptTracker
impl DeoptTracker
Sourcepub fn register(&mut self, function_id: u16, shape_ids: &[ShapeId])
pub fn register(&mut self, function_id: u16, shape_ids: &[ShapeId])
Register shape dependencies for a compiled function.
Called after successful JIT compilation when the compilation result includes shape guard IDs.
Sourcepub fn invalidate_shape(&mut self, shape_id: ShapeId) -> Vec<u16>
pub fn invalidate_shape(&mut self, shape_id: ShapeId) -> Vec<u16>
Invalidate all functions that depend on the given shape.
Returns the list of function IDs that were invalidated (need to have their JIT code removed from the native_code_table).
Sourcepub fn clear_function(&mut self, function_id: u16)
pub fn clear_function(&mut self, function_id: u16)
Clear all dependencies for a function (e.g., when it’s recompiled).
Sourcepub fn tracked_function_count(&self) -> usize
pub fn tracked_function_count(&self) -> usize
Number of functions being tracked.
Sourcepub fn watched_shape_count(&self) -> usize
pub fn watched_shape_count(&self) -> usize
Number of shapes being watched.
Auto Trait Implementations§
impl Freeze for DeoptTracker
impl RefUnwindSafe for DeoptTracker
impl Send for DeoptTracker
impl Sync for DeoptTracker
impl Unpin for DeoptTracker
impl UnsafeUnpin for DeoptTracker
impl UnwindSafe for DeoptTracker
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more