summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2016-02-25 00:13:41 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-24 20:21:12 -0300
commitef86d68a088c324e4bd85f82387d1f9a571affd0 (patch)
treee66c0b0d4906207cfac3cc9e8948e554fe49b2bd /tools/perf/util/hist.h
parent1f2d72cf3258eacd667cd1920e64c9b64b9984d5 (diff)
downloadlinux-ef86d68a088c324e4bd85f82387d1f9a571affd0.tar.gz
linux-ef86d68a088c324e4bd85f82387d1f9a571affd0.tar.bz2
linux-ef86d68a088c324e4bd85f82387d1f9a571affd0.zip
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>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r--tools/perf/util/hist.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index d08e4f36f193..722aa447f705 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -437,4 +437,6 @@ static inline struct rb_node *rb_hierarchy_next(struct rb_node *node)
return __rb_hierarchy_next(node, HMD_NORMAL);
}
+#define HIERARCHY_INDENT 3
+
#endif /* __PERF_HIST_H */