Skip to content

Commit

Permalink
feat: Add opcodes flamegraph and refactor gates flamegraph (#7282)
Browse files Browse the repository at this point in the history
Adds another command to the noir profiler binary, opcodes-flamegraph,
with the following usage:
```
noir-profiler opcodes-flamegraph -a PATH_TO_THE_ARTIFACT  -o OUTPUT_PATH
```
for example:

```
~/aztec-packages/noir/noir-repo/target/release/noir-profiler opcodes-flamegraph -a ~/aztec-packages/noir-projects/noir-protocol-circuits/target/private_kernel_inner.json  -o .
```
Results in a flamegraph that counts the opcodes (not the gates) for all
the call stacks, like the following:

![inner_opcodes](https://github.com/AztecProtocol/aztec-packages/assets/5372114/d3de9c63-79c1-43de-afd6-a9cf6fee42bd)

This PR also refactors the gates-flamegraph and adds as the last call
stack item the opcode type generated, to have more complete profiling
information:

![image](https://github.com/AztecProtocol/aztec-packages/assets/5372114/df8d1615-5d74-445a-866a-05f9c9d18754)
  • Loading branch information
sirasistant authored Jul 2, 2024
1 parent 4637304 commit df3b27b
Show file tree
Hide file tree
Showing 10 changed files with 598 additions and 382 deletions.
2 changes: 0 additions & 2 deletions noir/noir-repo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions noir/noir-repo/tooling/profiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ path = "src/main.rs"
color-eyre.workspace = true
clap.workspace = true
noirc_artifacts.workspace = true
nargo.workspace = true
const_format.workspace = true
serde.workspace = true
serde_json.workspace = true
fm.workspace = true
codespan-reporting.workspace = true
inferno = "0.11.19"
im.workspace = true
acir.workspace = true
Expand Down
Loading

0 comments on commit df3b27b

Please sign in to comment.