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

Cache call stacks when profiling Brillig execution #6544

Open
vezenovm opened this issue Nov 18, 2024 · 1 comment
Open

Cache call stacks when profiling Brillig execution #6544

vezenovm opened this issue Nov 18, 2024 · 1 comment
Labels
enhancement New feature or request profiler The Noir profiler

Comments

@vezenovm
Copy link
Contributor

vezenovm commented Nov 18, 2024

Problem

We have a call stack (which is a Vec<OpcodeLocation>) associated with every execution sample. Execution samples most likely have lots of repeated call stacks especially as we profile a loop heavy programs.

Happy Case

Each OpcodeLocation::Brillig consists of two usizes. We can build a cache for call stacks that we pass separately to the flamegraph generator. Each call stack would have an index associated with it and then the execution profiling sample would store the index into the call stack cache rather than the entire call stack.

Workaround

Yes

Workaround Description

More memory

Additional Context

No response

Project Impact

Nice-to-have

Blocker Context

Profiling large programs can require massive amounts of memory

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@vezenovm vezenovm added enhancement New feature or request profiler The Noir profiler labels Nov 18, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 18, 2024
@jfecher
Copy link
Contributor

jfecher commented Nov 18, 2024

Could also use im::Vector to take advantage of a type that is meant to be shared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request profiler The Noir profiler
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants