/// Build the list of inlined functions that contain `probe`.
Build the list of inlined functions that contain `probe`.
Build the list of inlined functions that contain ` probe ` .
fn find_inlined_functions(
        &self,
        probe: u64,
    ) -> iter::Rev<maybe_small::IntoIter<&InlinedFunction<R>>> {
        // `inlined_functions` is ordered from outside to inside.
        let mut inlined_functions = maybe_small::Vec::new();
        let mut inlined_addresses = &self.inlined_addresses[..];
        loop {
            let current_depth = inlined_functions.len();
            // Look up (probe, current_depth) in inline_ranges.
            // `inlined_addresses` is sorted in "breadth-first traversal order", i.e.
            // by `call_depth` first, and then by `range.begin`. See the comment at
            // the sort call for more information about why.
            let search = inlined_addresses.binary_search_by(|range| {
                if range.call_depth > current_depth {
                    Ordering::Greater
                } else if range.call_depth < current_depth {
                    Ordering::Less
                } else if range.range.begin > probe {
                    Ordering::Greater
                } else if range.range.end <= probe {
                    Ordering::Less
                } else {
                    Ordering::Equal
                }
            });
            if let Ok(index) = search {
                let function_index = inlined_addresses[index].function;
                inlined_functions.push(&self.inlined_functions[function_index]);
                inlined_addresses = &inlined_addresses[index + 1..];
            } else {
                break;
            }
        }
        inlined_functions.into_iter().rev()
    }
fn find_inlined_functions ( & self , probe : u64 , ) -> iter :: Rev < maybe_small :: IntoIter < & InlinedFunction < R > > > { // `inlined_functions` is ordered from outside to inside. let mut inlined_functions = maybe_small :: Vec :: new ( ) ; let mut inlined_addresses = & self . inlined_addresses [ .. ] ; loop { let current_depth = inlined_functions . len ( ) ; // Look up (probe, current_depth) in inline_ranges. // `inlined_addresses` is sorted in "breadth-first traversal order", i.e. // by `call_depth` first, and then by `range.begin`. See the comment at // the sort call for more information about why. let search = inlined_addresses . binary_search_by ( | range | { if range . call_depth > current_depth { Ordering :: Greater } else if range . call_depth < current_depth { Ordering :: Less } else if range . range . begin > probe { Ordering :: Greater } else if range . range . end <= probe { Ordering :: Less } else { Ordering :: Equal } } ) ; if let Ok ( index ) = search { let function_index = inlined_addresses [ index ] . function ; inlined_functions . push ( & self . inlined_functions [ function_index ] ) ; inlined_addresses = & inlined_addresses [ index + 1 .. ] ; } else { break ; } } inlined_functions . into_iter ( ) . rev ( ) }
Build the list of inlined functions that contain `probe`.
Build the list of inlined functions that contain ` probe ` .
&self
probe
u64