perf report: Show message for percent limit on stdio
authorNamhyung Kim <namhyung@kernel.org>
Fri, 26 Feb 2016 12:13:17 +0000 (21:13 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Feb 2016 14:20:36 +0000 (11:20 -0300)
commitbd4abd39db92225dde8335c37d6f4efb319f9cf2
tree45f33f43de30ee7e4dfa0ffa3b4d548e10299a42
parenta7b5895b91fb97f2b0dcc2e3ce47413c18d19ca5
perf report: Show message for percent limit on stdio

When the hierarchy mode is used, some entries might be omiited due to a
percent limit or filter.  In this case the output hierarchy is different
than other entries.  Add an informative message to users about this.

For example, when 4% of percent limit is applied:

Before:
  #       Overhead  Command / Shared Object / Symbol
  # ..............  ..........................................
  #
      49.09%        swapper
         48.67%        [kernel.vmlinux]
            34.42%        [k] intel_idle
      11.51%        firefox
          8.87%        libpthread-2.22.so
             6.60%        [.] __GI___libc_recvmsg
      10.49%        gnome-shell
          4.74%        libc-2.22.so
      10.08%        Xorg
          6.11%        libc-2.22.so
             5.27%        [.] __memcpy_sse2_unaligned
       6.15%        perf

Note that, gnome-shell/libc has no symbols and perf has no dso/symbols.
With that patch the output will look like below:

After:

  #       Overhead  Command / Shared Object / Symbol
  # ..............  ..........................................
  #
      49.09%        swapper
         48.67%        [kernel.vmlinux]
            34.42%        [k] intel_idle
      11.51%        firefox
          8.87%        libpthread-2.22.so
             6.60%        [.] __GI___libc_recvmsg
      10.49%        gnome-shell
          4.74%        libc-2.22.so
                          no entry >= 4.00%
      10.08%        Xorg
          6.11%        libc-2.22.so
             5.27%        [.] __memcpy_sse2_unaligned
       6.15%        perf
                       no entry >= 4.00%

Suggested-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1456488800-28124-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/stdio/hist.c