pub struct Graph { /* private fields */ }Expand description
The combined control-flow graph.
Implementations§
Source§impl Graph
impl Graph
Sourcepub fn merge(&mut self, gcov: Gcov) -> Result<()>
pub fn merge(&mut self, gcov: Gcov) -> Result<()>
Merges a parsed GCNO/GCDA into the graph.
§Errors
- Returns
VersionMismatchif a file has a different version than the previous ones merged. - Returns
DuplicatedFunctionif the same function is merged twice. - Returns
MissingFunctionif a function referred in a GCDA does not exist in the graph. - Returns
CountsMismatchif the number of profiled arcs in a GCDA does not match the corresponding GCNO.
Source§impl Graph
impl Graph
Sourcepub fn write_dot<W: Write>(
&self,
function_name: Symbol,
writer: W,
) -> Result<()>
pub fn write_dot<W: Write>( &self, function_name: Symbol, writer: W, ) -> Result<()>
Writes out the graph as Graphvis *.dot format.
This is mainly intended for debugging.
Only functions with name matching the input function_name symbol will be printed. If the function_name is
UNKNOWN_SYMBOL, however, all nodes will be printed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnwindSafe for Graph
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