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

Zhao Liu posted 6 patches 1 year, 5 months ago
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Mads Ynddal <mads@ynddal.dk>
[RFC 6/6] docs/tracing: Add simpletrace-rust section
Posted by Zhao Liu 1 year, 5 months ago
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 --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
 ------
 
-- 
2.34.1