Skip to content

RFC perf: Create hist_entry groups

Don Zickus lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf: Wrap __hists__add_entry to prep for group entry changetools/perf/builtin-annotate.c tools/perf/builtin-diff.c tools/perf/builtin-report.c +4 more+46 -330 replies
2/5perf: Use macros to walk hist entriestools/perf/builtin-diff.c tools/perf/builtin-top.c tools/perf/tests/hists_link.c +5 more+83 -1300 replies
3/5perf: Add in stub hist_entry_group codetools/perf/util/hist.c tools/perf/util/hist.h tools/perf/util/sort.c +1 more+163 -00 replies
4/5perf: Switch to using hist_entry_grouptools/perf/builtin-annotate.c tools/perf/builtin-diff.c tools/perf/builtin-top.c +9 more+471 -2780 replies
5/5perf: Enable multiple hist_entry_group outputtools/perf/builtin-report.c tools/perf/ui/gtk/hists.c tools/perf/ui/hist.c +5 more+301 -45 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] perf: Create hist_entry groups

This patchset creates a new layer of hist entry objects called hist_entry_groups. The purpose is to help organize the hist_entries into groups before sorting them. As a result you can gain a new perspective on the data by organizing the groups into cpu, pid or cacheline. See patch 5 for sample output.

The main driver for this patchset is to find a way to sort and display cacheline data in a way that is useful. My previous attempts seemed hackish until I realized cacheline sorting is really just a collection of hist_entries. Anyway that was my focus for doing this.

The overall idea looks like:

evlist
evsel
hists
hist_entry_group <<< new object
hist_entry

Implementing this was not pretty. I tried to seperate the patches the best I could. But in order for each patch to compile, patch 4 turned into a 1400 line diff that is mostly noise.

Also, this patchset breaks most tools (mainly because I don't understand all the interactions), hence the RFC. I mostly tested with 'perf report
--stdio' and 'perf mem report --stdio'.

Please let me know if this is an interesting idea to go forward with or not.

Don Zickus (5):
perf: Wrap __hists__add_entry to prep for group entry change
perf: Use macros to walk hist entries
perf: Add in stub hist_entry_group code
perf: Switch to using hist_entry_group
perf: Enable multiple hist_entry_group output

 tools/perf/builtin-annotate.c  |  13 +-
 tools/perf/builtin-diff.c      | 127 +++++-----
 tools/perf/builtin-report.c    |  14 +-
 tools/perf/builtin-top.c       |  22 +-
 tools/perf/tests/hists_link.c  | 124 ++++------
 tools/perf/ui/browsers/hists.c |  40 +++-
 tools/perf/ui/gtk/hists.c      |  80 ++++---
 tools/perf/ui/hist.c           |  29 ++-
 tools/perf/ui/stdio/hist.c     |  97 ++++++--
 tools/perf/util/evsel.c        |   7 +-
 tools/perf/util/hist.c         | 512 +++++++++++++++++++++++++++++------------
 tools/perf/util/hist.h         |  29 ++-
 tools/perf/util/sort.c         | 183 ++++++++++++++-
 tools/perf/util/sort.h         | 138 ++++++++++-
 14 files changed, 1017 insertions(+), 398 deletions(-)
Signature · 1 line
1.7.11.7