pub struct PgoHints {
pub hot_functions: Vec<String>,
pub likely_branches: Vec<(String, u32, bool)>,
pub inline_candidates: Vec<String>,
pub cold_functions: Vec<String>,
pub call_counts: HashMap<String, u64>,
}Expand description
Profile-guided optimization hints
Fields§
§hot_functions: Vec<String>§likely_branches: Vec<(String, u32, bool)>§inline_candidates: Vec<String>§cold_functions: Vec<String>§call_counts: HashMap<String, u64>Implementations§
Source§impl PgoHints
impl PgoHints
pub fn new() -> Self
pub fn mark_hot(&mut self, func_name: &str)
pub fn mark_cold(&mut self, func_name: &str)
pub fn mark_inline(&mut self, func_name: &str)
pub fn record_call(&mut self, func_name: &str, count: u64)
pub fn is_hot(&self, func_name: &str) -> bool
pub fn is_cold(&self, func_name: &str) -> bool
pub fn should_inline(&self, func_name: &str) -> bool
pub fn call_count(&self, func_name: &str) -> u64
Sourcepub fn total_hints(&self) -> usize
pub fn total_hints(&self) -> usize
Total number of hints across all categories.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PgoHints
impl RefUnwindSafe for PgoHints
impl Send for PgoHints
impl Sync for PgoHints
impl Unpin for PgoHints
impl UnsafeUnpin for PgoHints
impl UnwindSafe for PgoHints
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