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 stack collapse for multi-event perf.data files #136

Merged

Conversation

milianw
Copy link
Contributor

@milianw milianw commented Jun 27, 2017

Consider the perf.data file resulting from the following command:

perf record -e cycles,instructions,cache-misses

Creating a flamegraph for such a file is currently impossible.
Or, well, it's possible but the resulting file is meaningless and
misleading, as it will aggregate all samples for the different
event types.

This patch adds --event-filter <event-type> to create meaningful
flamegraphs from multi-event perf.data files. We can use it like
this:

perf script | stackcollapse-perf --event-filter cycles

By default, only the samples for the first encountered event type
will be used.

@milianw
Copy link
Contributor Author

milianw commented Jun 27, 2017

ah excellent - there are even tests! I'll fix those

Consider the perf.data file resulting from the following command:

    perf record -e cycles,instructions,cache-misses

Creating a flamegraph for such a file is currently impossible.
Or, well, it's possible but the resulting file is meaningless and
misleading, as it will aggregate all samples for the different
event types.

This patch adds `--event-filter <event-type>` to create meaningful
flamegraphs from multi-event perf.data files. We can use it like
this:

    perf script | stackcollapse-perf --event-filter cycles

By default, only the samples for the first encountered event type
will be used.
@milianw milianw force-pushed the wip/multi-event-perf-data-files branch from d0c2905 to 4b7b316 Compare June 27, 2017 16:01
@brendangregg
Copy link
Owner

Makes sense, thanks!

@brendangregg brendangregg merged commit e7441fd into brendangregg:master Jul 29, 2017
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.

2 participants