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

Add stackcollapse-trace-cmd.rb #344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igorwwwwwwwwwwwwwwwwwwww

This is a stackcollapse processor for the output of trace-cmd, specifically the output of trace-cmd report when processing a recording with the function_graph plugin.

It is designed to be used with flamegraph.pl --flamechart, and spacers are inserted to prevent individual calls from being merged.

There is also a latency cutoff parameter that can be used to filter for slow calls.

It's written in ruby, feel free to rewrite it in perl.

Usage:

$ sudo trace-cmd record -p function_graph -l do_linkat
$ sudo trace-cmd report | MIN_LATENCY_US=500 ruby stackcollapse-trace-cmd.rb | flamegraph.pl --hash --colors=perl --flamechart > flamechart.svg

Sample flamechart:

flamechart

Upstream issue:

This is a stackcollapse processor for the output of `trace-cmd`,
specifically the output of `trace-cmd report` when processing a
recording with the `function_graph` plugin.

It is designed to be used with flamegraph.pl --flamechart, and
spacers are inserted to prevent individual calls from being merged.

There is also a latency cutoff parameter that can be used to filter
for slow calls.
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.

1 participant