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

Support repl-driven profiling flamegraph generation #92

Open
4 tasks
jeaye opened this issue Sep 11, 2024 · 0 comments
Open
4 tasks

Support repl-driven profiling flamegraph generation #92

jeaye opened this issue Sep 11, 2024 · 0 comments

Comments

@jeaye
Copy link
Member

jeaye commented Sep 11, 2024

  • Be able to run perf (or similar) from code (likely backed by a C++ fn)
  • Port the stackcollapse-perf.pl to jank so we can collapse stacks
  • Use clj-async-profiler's generate-flamegraph for the rest
    • We likely can't pull this whole thing in as a library without patching it to be cljc and using reader conditionals; start by copying the code, if that's easier
  • Might need to implement spit for writing out the file

Current approach

echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
perf record -g -F max ./build/jank run test.jank
perf script | ../third-party/FlameGraph/stackcollapse-perf.pl >| perf.data.folded
../third-party/FlameGraph/flamegraph.pl --width 1920 --colors java perf.data.folded >| perf.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant