Skip to content

perf annotate: Add --skip-empty option (v1)

Namhyung Kim linux-perf-users lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf annotate: Use al->data_nr if possibletools/perf/util/annotate.c+3 -40 replies
2/5perf annotate: Set notes->src->nr_events earlytools/perf/util/annotate.c+6 -60 replies
3/5perf annotate: Use annotation__pcnt_width() consistentlytools/perf/util/annotate.c tools/perf/util/annotate.h+6 -100 replies
4/5perf annotate: Set al->data_nr using the notes->src->nr_eventstools/perf/util/disasm.c+2 -40 replies
5/5perf annotate: Add --skip-empty optiontools/perf/Documentation/perf-annotate.txt tools/perf/builtin-annotate.c tools/perf/util/annotate.c+22 -59 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchArnaldo Carvalho de Melo
1/5
2/5
3/5
4/5
5/5T-b T-b

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

Read the v1 thread

Cover letter [PATCHSET 0/5] perf annotate: Add --skip-empty option (v1)

Hello,

This is to make perf annotate has the same behavior as perf report. Especially in the TUI browser, we want to maintain the same experience when it comes to display dummy events from perf report.

  $ perf mem record -a -- perf test -w noploop
  $ perf evlist
  cpu/mem-loads,ldlat=30/P
  cpu/mem-stores/P
  dummy:u

Just using perf annotate with --group will show the all 3 events.

  $ perf annotate --group --stdio | head
   Percent                 |    Source code & Disassembly of ...
  --------------------------------------------------------------
                           : 0     0xe060 <_dl_relocate_object>:
      0.00    0.00    0.00 :    e060:       pushq   %rbp
      0.00    0.00    0.00 :    e061:       movq    %rsp, %rbp
      0.00    0.00    0.00 :    e064:       pushq   %r15
      0.00    0.00    0.00 :    e066:       movq    %rdi, %r15
      0.00    0.00    0.00 :    e069:       pushq   %r14
      0.00    0.00    0.00 :    e06b:       pushq   %r13
      0.00    0.00    0.00 :    e06d:       movl    %edx, %r13d

Now with --skip-empty, it'll hide the last dummy event.

  $ perf annotate --group --stdio --skip-empty | head
   Percent         |    Source code & Disassembly of ...
  ------------------------------------------------------
                   : 0     0xe060 <_dl_relocate_object>:
      0.00    0.00 :    e060:       pushq   %rbp
      0.00    0.00 :    e061:       movq    %rsp, %rbp
      0.00    0.00 :    e064:       pushq   %r15
      0.00    0.00 :    e066:       movq    %rdi, %r15
      0.00    0.00 :    e069:       pushq   %r14
      0.00    0.00 :    e06b:       pushq   %r13
      0.00    0.00 :    e06d:       movl    %edx, %r13d

The code is available in 'perf/annotate-skip-v1' branch at
git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung

Namhyung Kim (5):
perf annotate: Use al->data_nr if possible
perf annotate: Set notes->src->nr_events early
perf annotate: Use annotation__pcnt_width() consistently perf annotate: Set al->data_nr using the notes->src->nr_events perf annotate: Add --skip-empty option

 tools/perf/Documentation/perf-annotate.txt |  3 ++
 tools/perf/builtin-annotate.c              |  2 +
 tools/perf/util/annotate.c                 | 47 +++++++++++++---------
 tools/perf/util/annotate.h                 |  2 +-
 tools/perf/util/disasm.c                   |  6 +--
 5 files changed, 35 insertions(+), 25 deletions(-)
Signature · 1 line
2.46.0.rc2.264.g509ed76dc8-goog