cranelift_codegen::timing

Trait Profiler

Source
pub trait Profiler {
    // Required method
    fn start_pass(&self, pass: Pass) -> Box<dyn Any>;
}
Expand description

A profiler.

Required Methods§

Source

fn start_pass(&self, pass: Pass) -> Box<dyn Any>

Start a profiling pass.

Will return a token which when dropped indicates the end of the pass.

Multiple passes can be active at the same time, but they must be started and stopped in a LIFO fashion.

Implementors§