-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Martin Kröning <[email protected]>
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "rftrace-example" | ||
version = "0.1.0" | ||
authors = ["Martin Kröning <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] | ||
rftrace = "0.2" | ||
rftrace-frontend = "0.2" | ||
|
||
[target.'cfg(target_os = "hermit")'.dependencies] | ||
hermit = { path = "../../hermit" } | ||
|
||
[features] | ||
instrument-kernel = ["hermit/instrument"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#[cfg(target_os = "hermit")] | ||
use hermit as _; | ||
|
||
extern crate rftrace as _; | ||
use rftrace_frontend as rftrace; | ||
|
||
fn main() { | ||
let events = rftrace::init(2000, false); | ||
rftrace::enable(); | ||
f1(); | ||
// Uhyve mounts at `/host`, virtiofsd mounts to `/root` | ||
rftrace::dump_full_uftrace(events, "/root/tracedir", "rftrace-example").unwrap(); | ||
} | ||
|
||
#[inline(never)] | ||
fn f1() { | ||
f2(); | ||
} | ||
|
||
#[inline(never)] | ||
fn f2() { | ||
f3(); | ||
} | ||
|
||
#[inline(never)] | ||
fn f3() {} |