-
Notifications
You must be signed in to change notification settings - Fork 115
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
Port stackcollapse-bpftrace #51
Comments
Hey @jonhoo, I stumbled upon this project and I'm not sure I understand it yet, let alone this issue 😬 , but I'd like to contribute. How should I start and what's the outcome for this? |
Hi @felippemr! I'd recommend you start either with the video where this started or read up on flamegraph on your own! |
It does look like parsing the output of |
To get you started, something like $ sudo bpftrace -e 'profile:hz:99 { @[kstack()] = count(); }' There's some example output here, and here's some stuff I just got:
|
(you can also use |
A follow-up comment to brendangregg/FlameGraph#201 points out that they're actually adding direct support for the For interested readers, the hope is that with bpftrace/bpftrace#438 + bpftrace/bpftrace#430 + bpftrace/bpftrace#56, it should be possible to simply run # bpftrace -e 'profile:hz:49 { @[kstack(folded), ustack(folded)]++ } interval:s:30 { exit() }' | flamegraph > out.svg The folding happens entirely within |
Hey @jonhoo I lost track of this but thanks for you kind reply and I'm glad things worked! |
Given how cool bpftrace is, it seems like a great idea to also port
stackcollapse-bpftrace
into inferno! Looking at its code, this should be a pretty straightforward exercise, since the eBPF already does most of the collapsing for us, andustack
already emits lines that are nearly in the right format.The text was updated successfully, but these errors were encountered: