perf ui/stdio: Implement hierarchy output mode
authorNamhyung Kim <namhyung@kernel.org>
Wed, 24 Feb 2016 15:13:41 +0000 (00:13 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 24 Feb 2016 23:21:12 +0000 (20:21 -0300)
commitef86d68a088c324e4bd85f82387d1f9a571affd0
treee66c0b0d4906207cfac3cc9e8948e554fe49b2bd
parent1f2d72cf3258eacd667cd1920e64c9b64b9984d5
perf ui/stdio: Implement hierarchy output mode

The hierarchy output mode is to group entries for each level so that
user can see higher level picture more easily.  It also helps to find
out which component is most costly.  The output will look like below:

      15.11%     swapper
         14.97%     [kernel.vmlinux]
          0.09%     [libahci]
          0.05%     [iwlwifi]
      10.29%     irq/33-iwlwifi
          6.45%     [kernel.vmlinux]
          1.41%     [mac80211]
          1.15%     [iwldvm]
          1.14%     [iwlwifi]
          0.14%     [cfg80211]
       4.81%     firefox
          3.92%     libxul.so
          0.34%     [kernel.vmlinux]

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@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/1456326830-30456-10-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/stdio/hist.c
tools/perf/util/hist.h