From 3870eeee4d149e2ec2d4a6afa71263d2cc873e1e Mon Sep 17 00:00:00 2001 From: Jonathan Woollett-Light Date: Wed, 29 Nov 2023 15:06:28 +0000 Subject: [PATCH] docs: Improve tracing documentation Signed-off-by: Jonathan Woollett-Light --- docs/tracing.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/tracing.md b/docs/tracing.md index 490a85fe1304..8bbfda3d65c2 100644 --- a/docs/tracing.md +++ b/docs/tracing.md @@ -33,15 +33,32 @@ outputting a `Trace` level log when entering and exiting every function. It is disabled by default at compile-time. Tracing functionality has no impact on the release binary. +You can use `cargo run --bin clippy-tracing --` to build and run the +latest version in the repo or you can run +`cargo install --path src/clippy-tracing` to install the binary then use +`clippy-tracing` to run this binary. + +You can run `clippy-tracing --help` for help. + To enable tracing in Firecracker, add instrumentation with: ``` clippy-tracing \ --action fix \ --path ./src \ ---exclude vmm_config/logger.rs,virtio/gen,bindings.rs,net/gen,benches,logger/,signal_handler.rs,time.rs +--exclude \ +benches,\ +virtio/gen,bindings.rs,net/gen,\ +log-instrument-macros/,log-instrument/,clippy-tracing/,\ +vmm_config/logger.rs,logger/,signal_handler.rs,time.rs ``` +`--exclude` is used to avoid adding instrumentation in: +- tests. +- bindings. +- the instrumentation tooling. +- logger functionality that may form an infinite loop. + and re-compile with `--features tracing`: ```