• Namhyung Kim's avatar
    perf report: Show message for percent limit on stdio · bd4abd39
    Namhyung Kim authored
    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: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
    Signed-off-by: default avatarNamhyung 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    bd4abd39
hist.c 18 KB