Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Do not print entire functions when running debug trace #6814

Merged
merged 7 commits into from
Dec 13, 2024

Conversation

vezenovm
Copy link
Contributor

Description

Problem*

I was running NOIR_LOG=trace nargo on some programs and my entire output was entirely filled with the SSA of my program. I was unsure where we were printing this SSA, but then I found that a couple trace macros are called in the under constrained values check where we state which function we are processing. We should print the ID, not the entire function.

Summary*

I switched to using func IDs instead of the entire function. This makes the trace actually readable. I could turn off the underconstrained check, but I think we should switch this to use an ID either way. Someone attempting to use trace should not have to know that they need this flag in order to get some reasonable debug output.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@vezenovm vezenovm requested a review from a team December 13, 2024 21:21
Copy link
Contributor

github-actions bot commented Dec 13, 2024

Peak Memory Sample

Program Peak Memory
keccak256 78.71M
workspace 121.73M
regression_4709 286.66M
ram_blowup_regression 1.62G
private-kernel-tail 209.11M
private-kernel-reset 848.11M
private-kernel-inner 304.33M
parity-root 174.64M

Copy link
Contributor

github-actions bot commented Dec 13, 2024

Compilation Sample

Program Compilation Time %
sha256_regression 0m1.410s 0%
regression_4709 0m0.729s -4%
ram_blowup_regression 0m15.947s 0%
rollup-base-public 7m12.656s 6%
rollup-base-private 3m14.347s -9%
private-kernel-tail 0m1.459s 2%
private-kernel-reset 0m8.638s 0%
private-kernel-inner 0m2.325s -16%
parity-root 0m0.940s 9%
noir-contracts 2m41.686s 5%

@vezenovm vezenovm enabled auto-merge December 13, 2024 21:36
Copy link
Contributor

Changes to Brillig bytecode sizes

Generated at commit: 8701c47500aa73182f00728309f54a92f514788c, compared to commit: 88766b0a3aea9109b4374169d27c0be4707a4fee

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
sha256_regression +3 ❌ +0.04%

Full diff report 👇
Program Brillig opcodes (+/-) %
sha256_regression 6,920 (+3) +0.04%

Copy link
Contributor

Changes to number of Brillig opcodes executed

Generated at commit: 8701c47500aa73182f00728309f54a92f514788c, compared to commit: 88766b0a3aea9109b4374169d27c0be4707a4fee

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 +3 ❌ +0.00%
sha256_regression -3 ✅ -0.00%

Full diff report 👇
Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 183,753 (+3) +0.00%
sha256_regression 118,704 (-3) -0.00%

@vezenovm vezenovm added this pull request to the merge queue Dec 13, 2024
Merged via the queue into master with commit f065c66 Dec 13, 2024
64 checks passed
@vezenovm vezenovm deleted the mv/smaller-trace-do-not-print-funcs branch December 13, 2024 22:14
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Dec 14, 2024
…race (noir-lang/noir#6814)

chore(ci): Active rollup circuits in compilation report (noir-lang/noir#6813)
feat(ssa): Bring back tracking of RC instructions during DIE (noir-lang/noir#6783)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants