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

Method register_function

crates/wasmtime/src/profiling_agent/jitdump.rs:53–65  ·  view source on GitHub ↗
(&self, name: &str, code: &[u8])

Source from the content-addressed store, hash-verified

51
52impl ProfilingAgent for JitDumpAgent {
53 fn register_function(&self, name: &str, code: &[u8]) {
54 let mut jitdump_file = JITDUMP_FILE.lock().unwrap();
55 let jitdump_file = jitdump_file.as_mut().unwrap();
56 let timestamp = jitdump_file.get_time_stamp();
57 let tid = rustix::thread::gettid()
58 .as_raw_nonzero()
59 .get()
60 .cast_unsigned();
61 if let Err(err) = jitdump_file.dump_code_load_record(&name, code, timestamp, self.pid, tid)
62 {
63 println!("Jitdump: write_code_load_failed_record failed: {err:?}\n");
64 }
65 }
66}

Callers

nothing calls this directly

Calls 6

get_time_stampMethod · 0.80
dump_code_load_recordMethod · 0.80
unwrapMethod · 0.45
lockMethod · 0.45
as_mutMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected