]> git.baikalelectronics.ru Git - kernel.git/commit
perf report: Add --percentage option
authorNamhyung Kim <namhyung@kernel.org>
Tue, 14 Jan 2014 02:52:48 +0000 (11:52 +0900)
committerJiri Olsa <jolsa@redhat.com>
Wed, 16 Apr 2014 15:16:03 +0000 (17:16 +0200)
commit6bf5152db53b090f3177550871d46866f16d98b3
treeb08733dad6f875401f8751e7f7402443372d28eb
parent2d8eeef061d3af21929392267cfbbe18995b01d7
perf report: Add --percentage option

The --percentage option is for controlling overhead percentage
displayed.  It can only receive either of "relative" or "absolute".

"relative" means it's relative to filtered entries only so that the
sum of shown entries will be always 100%.  "absolute" means it retains
the original value before and after the filter is applied.

  $ perf report -s comm
  # Overhead       Command
  # ........  ............
  #
      74.19%           cc1
       7.61%           gcc
       6.11%            as
       4.35%            sh
       4.14%          make
       1.13%        fixdep
  ...

  $ perf report -s comm -c cc1,gcc --percentage absolute
  # Overhead       Command
  # ........  ............
  #
      74.19%           cc1
       7.61%           gcc

  $ perf report -s comm -c cc1,gcc --percentage relative
  # Overhead       Command
  # ........  ............
  #
      90.69%           cc1
       9.31%           gcc

Note that it has zero effect if no filter was applied.

Suggested-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1397145720-8063-3-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
tools/perf/Documentation/perf-report.txt
tools/perf/builtin-report.c
tools/perf/ui/browsers/hists.c
tools/perf/ui/gtk/hists.c
tools/perf/ui/hist.c
tools/perf/util/hist.c
tools/perf/util/hist.h
tools/perf/util/symbol.c
tools/perf/util/symbol.h