[ ] 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
perf
(or similar) from code (likely backed by a C++ fn)stackcollapse-perf.pl
to jank so we can collapse stacksgenerate-flamegraph
for the restspit
for writing out the fileCurrent approach