linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET 0/4] perf report: Omit dummy events in the output (v1)
@ 2024-02-13  7:52 Namhyung Kim
  2024-02-13  7:52 ` [PATCH 1/4] libperf evlist: Update group info in perf_evlist__remove() Namhyung Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Namhyung Kim @ 2024-02-13  7:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers
  Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users

Hello,

This work is to make the output compact by removing dummy events in
the evlist.  The dummy events are used to save side-band information
like task creation or memory address space change using mmap(2).  But
after collecting these, it's not used because it won't have any
samples.

Sometimes users want to run perf report --group to show all recorded
events together but they are not interested in those dummy events.
This just wastes the precious screen space so we want to get rid of
them after use.

perf report already has --skip-empty option to skip 0 result in the
stat output.  I think we can extend it to skip empty events that have
no samples.

Example output:

Before)
  #
  # Samples: 232  of events 'cpu/mem-loads,ldlat=30/P, cpu/mem-stores/P, dummy:u'
  # Event count (approx.): 3089861
  #
  #                 Overhead  Command      Shared Object      Symbol                               
  # ........................  ...........  .................  .....................................
  #
       9.29%   0.00%   0.00%  swapper      [kernel.kallsyms]  [k] update_blocked_averages
       5.26%   0.15%   0.00%  swapper      [kernel.kallsyms]  [k] __update_load_avg_se
       4.15%   0.00%   0.00%  perf-exec    [kernel.kallsyms]  [k] slab_update_freelist.isra.0
       3.87%   0.00%   0.00%  perf-exec    [kernel.kallsyms]  [k] memcg_slab_post_alloc_hook
       3.79%   0.17%   0.00%  swapper      [kernel.kallsyms]  [k] enqueue_task_fair
       3.63%   0.00%   0.00%  sleep        [kernel.kallsyms]  [k] next_uptodate_page
       2.86%   0.00%   0.00%  swapper      [kernel.kallsyms]  [k] __update_load_avg_cfs_rq
       2.78%   0.00%   0.00%  swapper      [kernel.kallsyms]  [k] __schedule
       2.34%   0.00%   0.00%  swapper      [kernel.kallsyms]  [k] intel_idle
       2.32%   0.97%   0.00%  swapper      [kernel.kallsyms]  [k] psi_group_change

After)
  #
  # Samples: 232  of events 'cpu/mem-loads,ldlat=30/P, cpu/mem-stores/P'
  # Event count (approx.): 3089861
  #
  #         Overhead  Command      Shared Object      Symbol                               
  # ................  ...........  .................  .....................................
  #
       9.29%   0.00%  swapper      [kernel.kallsyms]  [k] update_blocked_averages
       5.26%   0.15%  swapper      [kernel.kallsyms]  [k] __update_load_avg_se
       4.15%   0.00%  perf-exec    [kernel.kallsyms]  [k] slab_update_freelist.isra.0
       3.87%   0.00%  perf-exec    [kernel.kallsyms]  [k] memcg_slab_post_alloc_hook
       3.79%   0.17%  swapper      [kernel.kallsyms]  [k] enqueue_task_fair
       3.63%   0.00%  sleep        [kernel.kallsyms]  [k] next_uptodate_page
       2.86%   0.00%  swapper      [kernel.kallsyms]  [k] __update_load_avg_cfs_rq
       2.78%   0.00%  swapper      [kernel.kallsyms]  [k] __schedule
       2.34%   0.00%  swapper      [kernel.kallsyms]  [k] intel_idle
       2.32%   0.97%  swapper      [kernel.kallsyms]  [k] psi_group_change

Now 'Overhead' column only has two values for mem-loads and mem-stores.

Thanks,
Namhyung


Namhyung Kim (4):
  libperf evlist: Update group info in perf_evlist__remove()
  perf hist: Simplify hist printing logic for group events
  perf hist: Do not use event index in hpp__fmt()
  perf report: Do not show dummy events with --skip-empty

 tools/lib/perf/evlist.c                  | 21 +++++++
 tools/perf/Documentation/perf-report.txt |  3 +-
 tools/perf/builtin-report.c              | 14 ++++-
 tools/perf/ui/hist.c                     | 77 +++++++++++++-----------
 4 files changed, 79 insertions(+), 36 deletions(-)

-- 
2.43.0.687.g38aa6559b0-goog


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-02-16 20:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13  7:52 [PATCHSET 0/4] perf report: Omit dummy events in the output (v1) Namhyung Kim
2024-02-13  7:52 ` [PATCH 1/4] libperf evlist: Update group info in perf_evlist__remove() Namhyung Kim
2024-02-14 23:50   ` Ian Rogers
2024-02-15  5:16     ` Namhyung Kim
2024-02-13  7:52 ` [PATCH 2/4] perf hist: Simplify hist printing logic for group events Namhyung Kim
2024-02-14 23:57   ` Ian Rogers
2024-02-15  5:18     ` Namhyung Kim
2024-02-13  7:52 ` [PATCH 3/4] perf hist: Do not use event index in hpp__fmt() Namhyung Kim
2024-02-15  0:08   ` Ian Rogers
2024-02-15  5:26     ` Namhyung Kim
2024-02-15  7:54       ` Ian Rogers
2024-02-16 20:08         ` Namhyung Kim
2024-02-13  7:52 ` [PATCH 4/4] perf report: Do not show dummy events with --skip-empty Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).