MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / set_thread_profiler

Function set_thread_profiler

cranelift/codegen/src/timing.rs:137–139  ·  view source on GitHub ↗

Set the profiler for the current thread. Returns the old profiler.

(new_profiler: Box<dyn Profiler>)

Source from the content-addressed store, hash-verified

135 ///
136 /// Returns the old profiler.
137 pub fn set_thread_profiler(new_profiler: Box<dyn Profiler>) -> Box<dyn Profiler> {
138 PROFILER.with(|profiler| core::mem::replace(&mut *profiler.borrow_mut(), new_profiler))
139 }
140
141 /// Start timing `pass` as a child of the currently running pass, if any.
142 ///

Callers

nothing calls this directly

Calls 2

replaceFunction · 0.50
withMethod · 0.45

Tested by

no test coverage detected