From aee91960846cc5786b1ce0f87b107534440a8450 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 28 Feb 2024 19:40:58 +0100 Subject: rt: add missing doc for with_profile --- src/rt.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/rt.rs b/src/rt.rs index f468033..3a77db1 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -90,6 +90,15 @@ impl Runtime { } } + /// Create a new [Runtime] which also generates static perf metat data. + /// + /// For each function added to the [Runtime], an entry will be generated in the + /// `/tmp/perf-.map` file, which `perf report` uses to symbolicate unknown addresses. + /// This is applicable for static runtimes only. + /// + /// # Panics + /// + /// Panics if the `mmap` call fails. pub fn with_profile() -> Runtime { let mut rt = Runtime::new(); rt.perf = Some(perf::PerfMap::new()); -- cgit v1.2.3