-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from a16z/book/tracing
docs: add chrome tracing info
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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-<timestamp>.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-<timestamp>.json`. Load these traces into [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. |