From ba1d963f8111751979f08c4f3c2314122f3aaf7d Mon Sep 17 00:00:00 2001 From: sragss Date: Mon, 15 Apr 2024 13:52:29 -0700 Subject: [PATCH 1/2] add more book tracing info --- book/src/dev/tools.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/book/src/dev/tools.md b/book/src/dev/tools.md index 94f2d8a68..cc39570e8 100644 --- a/book/src/dev/tools.md +++ b/book/src/dev/tools.md @@ -1,12 +1,14 @@ # Development Tools ## Tracing Jolt is instrumented using [tokio-rs/tracing](https://github.com/tokio-rs/tracing). These traces can be displayed using the `--format chrome` flag, for example: -`cargo run -p jolt-core --release -- trace --name sha3 --format chrome` +`cargo run -p jolt-core --release -- trace --name sha2-chain --format chrome` -After tracing, files can be found in the workspace root with a name `trace-.json`. Load these traces into `chrome://tracing` or `https://ui.perfetto.dev/`. +After tracing, files can be found in the workspace root with a name `trace-.json`. Load these traces into [chrome://tracing](chrome://tracing) or [perfetto](https://ui.perfetto.dev/). ![Tracing in Jolt](../imgs/tracing.png) +Often it's easiest to debug performance for a particular segment by adding granular tracing, adjusting code, rerunning the `sha2-chain` end-to-end benchmark and looking through the Chrome traces. + ## Objdump Debugging the emulator / tracer can be hard. Use `riscv64-unknown-elf-objdump` to compare the actual ELF to the `.bytecode` / `.jolttrace` files. \ No newline at end of file From 2e83c7dfc38b21c9dee49194bcf5ce8c1576d2a0 Mon Sep 17 00:00:00 2001 From: Sam Ragsdale <65786432+sragss@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:54:14 -0700 Subject: [PATCH 2/2] Update book/src/dev/tools.md Co-authored-by: Michael Zhu --- book/src/dev/tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/dev/tools.md b/book/src/dev/tools.md index cc39570e8..3b1ee45dd 100644 --- a/book/src/dev/tools.md +++ b/book/src/dev/tools.md @@ -3,7 +3,7 @@ Jolt is instrumented using [tokio-rs/tracing](https://github.com/tokio-rs/tracing). These traces can be displayed using the `--format chrome` flag, for example: `cargo run -p jolt-core --release -- trace --name sha2-chain --format chrome` -After tracing, files can be found in the workspace root with a name `trace-.json`. Load these traces into [chrome://tracing](chrome://tracing) or [perfetto](https://ui.perfetto.dev/). +After tracing, files can be found in the workspace root with a name `trace-.json`. Load these traces into [perfetto](https://ui.perfetto.dev/). ![Tracing in Jolt](../imgs/tracing.png)