diff mbox series

[RFC,6/6] docs/tracing: Add simpletrace-rust section

Message ID 20240527081421.2258624-7-zhao1.liu@intel.com
State New
Headers show
Series scripts: Rewrite simpletrace printer in Rust | expand

Commit Message

Zhao Liu May 27, 2024, 8:14 a.m. UTC
Describe how to compile and use this Rust version program.

And also define the Rust code contribution requirements.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
 docs/devel/tracing.rst | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
diff mbox series

Patch

diff --git a/docs/devel/tracing.rst b/docs/devel/tracing.rst
index 043bed7fd0fc..9f31fa38f9bc 100644
--- a/docs/devel/tracing.rst
+++ b/docs/devel/tracing.rst
@@ -273,6 +273,41 @@  You must ensure that the same "trace-events-all" file was used to build QEMU,
 otherwise trace event declarations may have changed and output will not be
 consistent.
 
+Simpletrace-rust
+----------------
+
+Simpletrace-rust (scripts/Simpletrace-rust) is a Rust implementation of
+simpletrace.py, with the same command line arguments as the Python script.
+
+Simpletrace-rust has faster trace parsing compared to the Python version.
+
+The script is compiled by::
+
+    cargo build --manifest-path ./scripts/simpletrace-rust/Cargo.toml --release
+
+Or under scripts/simpletrace-rust, just use::
+
+    cargo build --release
+
+The script also takes the "trace-events-all" file and the binary trace::
+
+    ./scripts/simpletrace-rust/target/release/simpletrace-rust trace-events-all \
+                                                               trace-12345
+
+Any contribution to Simpletrace-rust needs to do the following checks:
+
+Compilation check::
+
+    cargo build
+
+Clippy check::
+
+    cargo clippy
+
+Code style check::
+
+    cargo +nightly fmt --check
+
 Ftrace
 ------