Skip to content

RFC perf tools: Display tracepoint enahncements

Jiri Olsa lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest22 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22perf tools: Fix memory leak in event_format__print functiontools/perf/util/trace-event-parse.c+1 -01 reply
2/22perf tools: Add time sort entrytools/perf/builtin-annotate.c tools/perf/builtin-diff.c tools/perf/tests/hists_link.c +5 more+87 -110 replies
3/22perf tools: Add idx sort entrytools/perf/util/hist.c tools/perf/util/hist.h tools/perf/util/sort.c +1 more+28 -00 replies
4/22perf tools: Add --list report optiontools/perf/builtin-report.c tools/perf/util/hist.c tools/perf/util/sort.c +2 more+37 -22 replies
5/22perf tools: Add sort_entry struct into sort entries callbackstools/perf/ui/gtk/hists.c tools/perf/ui/hist.c tools/perf/util/hist.c +2 more+154 -920 replies
6/22perf tools: Add selected bool into se_snprintf sort entries callbacktools/perf/ui/gtk/hists.c tools/perf/ui/hist.c tools/perf/util/sort.c +1 more+30 -40 replies
7/22perf tools: Implement selected bool se_snprintf callback logictools/perf/ui/browsers/hists.c tools/perf/ui/hist.c tools/perf/ui/stdio/hist.c +1 more+9 -60 replies
8/22perf tools: Implement selected logic for time sort entrytools/perf/ui/browsers/hists.c tools/perf/util/sort.c+16 -30 replies
9/22perf tools: Factor ui_browser ops out of ui_browser structtools/perf/ui/browser.c tools/perf/ui/browser.h tools/perf/ui/browsers/annotate.c +5 more+74 -500 replies
10/22perf tools: Add header callback into ui_browser_ops structtools/perf/ui/browser.c tools/perf/ui/browser.h+9 -00 replies
11/22perf tools: Remove ev_name argument from perf_evsel__hists_browsetools/perf/ui/browsers/hists.c+11 -140 replies
12/22perf tools: Add header callback to hist browsertools/perf/ui/browser.c tools/perf/ui/browser.h tools/perf/ui/browsers/hists.c+54 -190 replies
13/22perf tools: Factor hpp_arg struct to carry hist_browsertools/perf/ui/browsers/hists.c+8 -80 replies
14/22perf tools tui: Display columns header text on 'H' presstools/perf/ui/browser.c tools/perf/ui/browser.h tools/perf/ui/browsers/hists.c+84 -80 replies
15/22tools lib traceevent: Factor print_event_fields functiontools/lib/traceevent/event-parse.c tools/lib/traceevent/event-parse.h+71 -590 replies
16/22tools lib traceevent: Make the name output optional in pevent_field_infotools/lib/traceevent/event-parse.c tools/lib/traceevent/event-parse.h+8 -40 replies
17/22tools lib traceevent: Add pevent_field_cmp functiontools/lib/traceevent/event-parse.c tools/lib/traceevent/event-parse.h+59 -00 replies
18/22perf tools: Factor sort entries loopstools/perf/ui/browsers/hists.c tools/perf/ui/gtk/hists.c tools/perf/ui/hist.c +4 more+33 -100 replies
19/22perf tools: Add local hists sort entry listtools/perf/util/evsel.c tools/perf/util/hist.h tools/perf/util/sort.c +1 more+16 -20 replies
20/22perf tools: Make hists col_len dynamicaly alocatedtools/perf/util/evsel.c tools/perf/util/evsel.h tools/perf/util/hist.c +2 more+38 -130 replies
21/22perf tools: Add raw info into hist entrytools/perf/builtin-annotate.c tools/perf/builtin-diff.c tools/perf/builtin-report.c +4 more+64 -150 replies
22/22perf tools: Add support for tracepoint fieldstools/perf/Documentation/perf-report.txt tools/perf/Makefile.perf tools/perf/builtin-report.c +2 more+284 -00 replies

Reviews trailers per patch

1 of 22 patches has a Reviewed-by or Acked-by.

PatchNamhyung Kim
1/22A-b
2/22
3/22
4/22
5/22
6/22
7/22
8/22
9/22
10/22
11/22
12/22
13/22
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 00/22] perf tools: Display tracepoint enahncements

hi,
sending out tracepoint (mostly) events display enahncements.

* adding the '--tp' option for report command to show tracepoint related info. Use can specify following switches:
fields: shows separated tracepoint fields
format: shows tracepoints 'print fmt' in single column
(This is default if no switch is given.)

  $ perf report --tp --no-children
  Samples: 4K of event 'sched:sched_switch', Event count (approx.): 4788
   Overhead          Command      Shared Object          Symbol  Print fmt
  +  26.27%          swapper  [kernel.kallsyms]  [k] __schedule  swapper/2:0 [120] R ==> offlineimap:22134 [120]
  +  26.27%      offlineimap  [kernel.kallsyms]  [k] __schedule  offlineimap:22134 [120] S ==> swapper/2:0 [120]
  -   8.15%          swapper  [kernel.kallsyms]  [k] __schedule  swapper/3:0 [120] R ==> offlineimap:22134 [120]
       __schedule
       schedule_preempt_disabled
       cpu_startup_entry
       start_secondary
  +   8.15%      offlineimap  [kernel.kallsyms]  [k] __schedule  offlineimap:22134 [120] S ==> swapper/3:0 [120]
  $ perf report --tp=fields --no-children
  Samples: 4K of event 'sched:sched_switch', Event count (approx.): 4788
    Overhead          Command      Shared Object          Symbol                       prev_comm    prev_pid   prev_prio          prev_state                       next_comm    next_pid   next_prio
  +   26.27%          swapper  [kernel.kallsyms]  [k] __schedule                       swapper/2           0         120                   0                     offlineimap       22134         120
  +   26.27%      offlineimap  [kernel.kallsyms]  [k] __schedule                     offlineimap       22134         120                   1                       swapper/2           0         120
  -    8.15%          swapper  [kernel.kallsyms]  [k] __schedule                       swapper/3           0         120                   0                     offlineimap       22134         120
       __schedule
       schedule_preempt_disabled
       cpu_startup_entry
       start_secondary
  +    8.15%      offlineimap  [kernel.kallsyms]  [k] __schedule                     offlineimap       22134         120                   1                       swapper/3           0         120

* adding '--list' report option to display entries sequentialy:

Samples: 2K of event 'sched:sched_switch', Event count (approx.): 2450

        Self  Children                              Time          Command                Shared Object                                                       Symbol  Print fmt
  +    0.04%     0.04%        9582.431783 +000000.000000          swapper  [kernel.kallsyms]            [k] __schedule                                               swapper/1:0 [120] R ==> perf:11168 [120]
  -    0.00%     0.04%        9582.431783 +000000.000000          swapper  [kernel.kallsyms]            [k] __schedule                                               swapper/1:0 [120] R ==> perf:11168 [120]
       __schedule
       schedule
       cpu_idle
       start_secondary
  +    0.00%     0.04%        9582.431783 +000000.000000          swapper  [kernel.kallsyms]            [k] schedule                                                 swapper/1:0 [120] R ==> perf:11168 [120]
  +    0.00%     0.04%        9582.431783 +000000.000000          swapper  [kernel.kallsyms]            [k] cpu_idle                                                 swapper/1:0 [120] R ==> perf:11168 [120]

* adding 'H' key handler to togle header columns

thanks for comments,
jirka

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>

---
Jiri Olsa (22):
perf tools: Fix memory leak in event_format__print function perf tools: Add time sort entry
perf tools: Add idx sort entry
perf tools: Add --list report option
perf tools: Add sort_entry struct into sort entries callbacks perf tools: Add selected bool into se_snprintf sort entries callback perf tools: Implement selected bool se_snprintf callback logic perf tools: Implement selected logic for time sort entry perf tools: Factor ui_browser ops out of ui_browser struct perf tools: Add header callback into ui_browser_ops struct perf tools: Remove ev_name argument from perf_evsel__hists_browse perf tools: Add header callback to hist browser
perf tools: Factor hpp_arg struct to carry hist_browser perf tools tui: Display columns header text on 'H' press tools lib traceevent: Factor print_event_fields function tools lib traceevent: Make the name output optional in pevent_field_info tools lib traceevent: Add pevent_field_cmp function
perf tools: Factor sort entries loops
perf tools: Add local hists sort entry list
perf tools: Make hists col_len dynamicaly alocated
perf tools: Add raw info into hist entry
perf tools: Add support for tracepoint fields

 tools/lib/traceevent/event-parse.c       | 181 +++++++++++++++++++++----------
 tools/lib/traceevent/event-parse.h       |  10 ++
 tools/perf/Documentation/perf-report.txt |   6 ++
 tools/perf/Makefile.perf                 |   1 +
 tools/perf/builtin-annotate.c            |   4 +-
 tools/perf/builtin-diff.c                |   4 +-
 tools/perf/builtin-report.c              |  52 ++++++++-
 tools/perf/tests/hists_link.c            |   6 +-
 tools/perf/ui/browser.c                  | 101 ++++++++++++-----
 tools/perf/ui/browser.h                  |  31 ++++--
 tools/perf/ui/browsers/annotate.c        |  19 ++--
 tools/perf/ui/browsers/header.c          |   8 +-
 tools/perf/ui/browsers/hists.c           | 168 ++++++++++++++++++++++-------
 tools/perf/ui/browsers/map.c             |   8 +-
 tools/perf/ui/browsers/scripts.c         |   2 +-
 tools/perf/ui/gtk/hists.c                |   8 +-
 tools/perf/ui/hist.c                     |  10 +-
 tools/perf/ui/stdio/hist.c               |   6 +-
 tools/perf/ui/tui/util.c                 |   8 +-
 tools/perf/util/evsel.c                  |  24 +++--
 tools/perf/util/evsel.h                  |   6 +-
 tools/perf/util/hist.c                   |  65 ++++++++---
 tools/perf/util/hist.h                   |  20 +++-
 tools/perf/util/python.c                 |   3 +-
 tools/perf/util/report-tp.c              | 244 +++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/report-tp.h              |  18 ++++
 tools/perf/util/sort.c                   | 370 +++++++++++++++++++++++++++++++++++++++++++++++++--------------
 tools/perf/util/sort.h                   |  29 ++++-
 tools/perf/util/symbol.h                 |   3 +-
 tools/perf/util/trace-event-parse.c      |   1 +
 tools/perf/util/util.h                   |  17 +++
 31 files changed, 1144 insertions(+), 289 deletions(-)
 create mode 100644 tools/perf/util/report-tp.c
 create mode 100644 tools/perf/util/report-tp.h