File tree Expand file tree Collapse file tree 4 files changed +51
-1
lines changed Expand file tree Collapse file tree 4 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 17
17
- uses : actions/checkout@v4
18
18
with :
19
19
submodules : true
20
+ - uses : dtolnay/rust-toolchain@nightly
21
+ with :
22
+ components : rust-src
20
23
- uses : mkroening/rust-toolchain-toml@main
21
- - run : rustup component add clippy
24
+ - run : rustup component add clippy llvm-tools
22
25
- name : Clippy
23
26
run : |
24
27
cargo clippy --all-targets
43
46
- uses : actions/checkout@v4
44
47
with :
45
48
submodules : true
49
+ - uses : dtolnay/rust-toolchain@nightly
50
+ with :
51
+ components : rust-src
46
52
- uses : mkroening/rust-toolchain-toml@main
53
+ - run : rustup component add llvm-tools
47
54
- name : Check docs
48
55
run : cargo doc --no-deps --document-private-items
49
56
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ members = [
11
11
" examples/miotcp" ,
12
12
" examples/mioudp" ,
13
13
" examples/polling" ,
14
+ " examples/rftrace-example" ,
14
15
" examples/testtcp" ,
15
16
" examples/testudp" ,
16
17
" examples/tls" ,
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " rftrace-example"
3
+ version = " 0.1.0"
4
+ authors = [
" Martin Kröning <[email protected] >" ]
5
+ edition = " 2021"
6
+ publish = false
7
+
8
+ [dependencies ]
9
+ rftrace = " 0.2"
10
+ rftrace-frontend = " 0.2"
11
+
12
+ [target .'cfg(target_os = "hermit")' .dependencies ]
13
+ hermit = { path = " ../../hermit" }
14
+
15
+ [features ]
16
+ instrument-kernel = [" hermit/instrument" ]
Original file line number Diff line number Diff line change
1
+ #[ cfg( target_os = "hermit" ) ]
2
+ use hermit as _;
3
+
4
+ extern crate rftrace as _;
5
+ use rftrace_frontend as rftrace;
6
+
7
+ fn main ( ) {
8
+ let events = rftrace:: init ( 2000 , false ) ;
9
+ rftrace:: enable ( ) ;
10
+ f1 ( ) ;
11
+ // Uhyve mounts at `/host`, virtiofsd mounts to `/root`
12
+ rftrace:: dump_full_uftrace ( events, "/root/tracedir" , "rftrace-example" ) . unwrap ( ) ;
13
+ }
14
+
15
+ #[ inline( never) ]
16
+ fn f1 ( ) {
17
+ f2 ( ) ;
18
+ }
19
+
20
+ #[ inline( never) ]
21
+ fn f2 ( ) {
22
+ f3 ( ) ;
23
+ }
24
+
25
+ #[ inline( never) ]
26
+ fn f3 ( ) { }
You can’t perform that action at this time.
0 commit comments