Skip to content

Commit 516e9ed

Browse files
authored
Merge branch 'main' into fix_patch_async_drives
2 parents ed072a4 + e03ae44 commit 516e9ed

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

docs/tracing.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,35 @@ outputting a `Trace` level log when entering and exiting every function.
3333
It is disabled by default at compile-time. Tracing functionality has no
3434
impact on the release binary.
3535

36+
You can use `cargo run --bin clippy-tracing --` to build and run the
37+
latest version in the repo or you can run
38+
`cargo install --path src/clippy-tracing` to install the binary then use
39+
`clippy-tracing` to run this binary.
40+
41+
You can run `clippy-tracing --help` for help.
42+
3643
To enable tracing in Firecracker, add instrumentation with:
3744

3845
```
3946
clippy-tracing \
40-
--action fix \
41-
--path ./src \
42-
--exclude vmm_config/logger.rs,virtio/gen,bindings.rs,net/gen,benches,logger/,signal_handler.rs,time.rs
47+
--action fix \
48+
--path ./src \
49+
--exclude \
50+
benches,\
51+
virtio/gen,bindings.rs,net/gen,\
52+
log-instrument-macros/,log-instrument/,clippy-tracing/,\
53+
vmm_config/logger.rs,logger/,signal_handler.rs,time.rs
4354
```
4455

45-
and re-compile with `--features tracing`:
56+
`--exclude` can be used to avoid adding instrumentation to specific
57+
files, here it is used to avoid adding instrumentation in:
58+
59+
- tests.
60+
- bindings.
61+
- the instrumentation tooling.
62+
- logger functionality that may form an infinite loop.
63+
64+
After adding instrumentation re-compile with `--features tracing`:
4665

4766
```
4867
cargo build --features tracing

src/utils/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ versionize = "0.1.10"
1818
versionize_derive = "0.1.6"
1919
vmm-sys-util = "0.11.2"
2020
vm-memory = { version = "0.13.0", features = ["backend-mmap", "backend-bitmap"] }
21-
log-instrument = { path = "../log-instrument", optional = true }
21+
log-instrument = { path = "../log-instrument" }
2222

2323
[dev-dependencies]
2424
serde_json = "1.0.99"
2525

2626
[features]
27-
tracing = ["log-instrument"]
27+
tracing = []

0 commit comments

Comments
 (0)