Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310976
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 15/17] perf report: Add --hierarchy option |
| Date | 2016-01-16 17:10 +0100 |
| Message-ID | <qRBAm-6Ad-19@gated-at.bofh.it> (permalink) |
| References | <qRBAm-6Ad-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The --hierarchy option is to show output in hierarchy mode. It extends
folding/unfolding in the TUI and GTK browsers to support sort items as
well as callchains. Users can toggle the items to see the performance
result at wanted level.
$ perf report --hierarchy --tui
Overhead Command / Shared Object / Symbol
+ 32.96% gnome-shell
- 15.11% swapper
- 14.97% [kernel.vmlinux]
6.82% [k] intel_idle
0.66% [k] menu_select
0.43% [k] __hrtimer_start_range_ns
...
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Documentation/perf-report.txt | 3 +++
tools/perf/Documentation/tips.txt | 1 +
tools/perf/builtin-report.c | 17 +++++++++++++++++
3 files changed, 21 insertions(+)
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 8a301f6afb37..d2b4d6e15622 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -398,6 +398,9 @@ include::itrace.txt[]
--raw-trace::
When displaying traceevent output, do not use print fmt or plugins.
+--hierarchy::
+ Enable hierarchical output.
+
include::callchain-overhead-calculation.txt[]
SEE ALSO
diff --git a/tools/perf/Documentation/tips.txt b/tools/perf/Documentation/tips.txt
index e0ce9573b79b..5950b5a24efd 100644
--- a/tools/perf/Documentation/tips.txt
+++ b/tools/perf/Documentation/tips.txt
@@ -27,3 +27,4 @@ Skip collecing build-id when recording: perf record -B
To change sampling frequency to 100 Hz: perf record -F 100
See assembly instructions with percentage: perf annotate <symbol>
If you prefer Intel style assembly, try: perf annotate -M intel
+For hierarchical output, try: perf report --hierarchy
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 2bf537f190a0..fd26db0f4c74 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -798,6 +798,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
"only show processor socket that match with this filter"),
OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace,
"Show raw trace event output (do not use print fmt or plugins)"),
+ OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy,
+ "Show entries in a hierarchy"),
OPT_END()
};
struct perf_data_file file = {
@@ -907,6 +909,21 @@ repeat:
symbol_conf.cumulate_callchain = false;
}
+ if (symbol_conf.report_hierarchy) {
+ /* disable incompatible options */
+ symbol_conf.event_group = false;
+ symbol_conf.cumulate_callchain = false;
+
+ if (field_order) {
+ pr_err("Error: --hierarchy and --fields options cannot be used together\n");
+ parse_options_usage(report_usage, options, "F", 1);
+ parse_options_usage(NULL, options, "hierarchy", 0);
+ goto error;
+ }
+
+ sort__need_collapse = true;
+ }
+
if (setup_sorting(session->evlist) < 0) {
if (sort_order)
parse_options_usage(report_usage, options, "s", 1);
--
2.6.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 16/17] perf hists: Support decaying in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 13/17] perf hists browser: Align column header in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 15/17] perf report: Add --hierarchy option Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-01-17 17:20 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-19 12:00 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 18:00 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-01-20 18:10 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 18:20 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-21 05:10 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-01-21 11:50 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-21 14:00 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-01-21 14:40 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-21 15:10 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-22 11:50 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-22 11:50 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-01-22 12:40 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-01-21 12:40 +0100
Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-01-21 14:10 +0100
[PATCH 08/17] perf hists browser: Fix context menu item Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [PATCH 08/17] perf hists browser: Fix context menu item Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-21 02:00 +0100
Re: [PATCH 08/17] perf hists browser: Fix context menu item Namhyung Kim <namhyung@kernel.org> - 2016-01-21 05:10 +0100
Re: [PATCH 08/17] perf hists browser: Fix context menu item Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-22 01:00 +0100
Re: [PATCH 08/17] perf hists browser: Fix context menu item Namhyung Kim <namhyung@kernel.org> - 2016-01-22 12:10 +0100
Dynamicly add/remove sort keys was: Re: [PATCH 08/17] perf hists browser: Fix context menu item Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-22 15:40 +0100
[PATCH 04/17] perf hists: Cleanup filtering functions Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [PATCH 04/17] perf hists: Cleanup filtering functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 21:40 +0100
[PATCH v2 04.1/17] perf hists: Remove parent filter check in DSO filter function Namhyung Kim <namhyung@kernel.org> - 2016-01-20 02:30 +0100
[PATCH v2 04.2/17] perf hists: Cleanup filtering functions Namhyung Kim <namhyung@kernel.org> - 2016-01-20 02:30 +0100
Re: [PATCH v2 04.2/17] perf hists: Cleanup filtering functions Jiri Olsa <jolsa@redhat.com> - 2016-01-21 13:10 +0100
Re: [PATCH v2 04.1/17] perf hists: Remove parent filter check in DSO filter function Jiri Olsa <jolsa@redhat.com> - 2016-01-21 13:10 +0100
[PATCH 02/17] perf hists: Resort hist entries with hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [PATCH 02/17] perf hists: Resort hist entries with hierarchy Jiri Olsa <jolsa@redhat.com> - 2016-01-21 12:50 +0100
Re: [PATCH 02/17] perf hists: Resort hist entries with hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-01-21 14:10 +0100
[PATCH 10/17] perf hists browser: Support collapsing/expanding whole entries in hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 07/17] perf ui/stdio: Align column header for hierarchy output Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [PATCH 07/17] perf ui/stdio: Align column header for hierarchy output Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 23:50 +0100
Re: [PATCH 07/17] perf ui/stdio: Align column header for hierarchy output Namhyung Kim <namhyung@kernel.org> - 2016-01-21 05:10 +0100
[PATCH 12/17] perf hists browser: Implement hierarchy output Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 05/17] perf hists: Support filtering in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 11/17] perf hists browser: Factor out hist_browser__show_callchain() Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 06/17] perf ui/stdio: Implement hierarchy output mode Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
[PATCH 03/17] perf hists: Add helper functions for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [PATCH 03/17] perf hists: Add helper functions for hierarchy mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 23:20 +0100
Re: [PATCH 03/17] perf hists: Add helper functions for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-21 05:00 +0100
[PATCH v2 03/17] perf hists: Add helper functions for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-21 05:20 +0100
Re: [PATCH v2 03/17] perf hists: Add helper functions for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-01-21 14:10 +0100
[PATCH 09/17] perf hists browser: Count number of hierarchy entries Namhyung Kim <namhyung@kernel.org> - 2016-01-16 17:10 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Pekka Enberg <penberg@kernel.org> - 2016-01-17 11:30 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-19 11:50 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Andi Kleen <andi@firstfloor.org> - 2016-01-17 20:40 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-19 11:50 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 22:10 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 22:10 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Andi Kleen <andi@firstfloor.org> - 2016-01-19 23:20 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 23:30 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-20 02:00 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-20 02:40 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Andi Kleen <andi@firstfloor.org> - 2016-01-20 02:50 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Andi Kleen <andi@firstfloor.org> - 2016-01-20 03:00 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 14:40 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 21:10 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 22:00 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-20 01:40 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Andi Kleen <andi@firstfloor.org> - 2016-01-20 06:30 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Taeung Song <taeung.dev@gmail.com> - 2016-01-20 09:00 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-20 16:10 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Taeung Song <taeung.dev@gmail.com> - 2016-01-20 17:40 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-21 05:20 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Taeung Song <taeung.dev@gmail.com> - 2016-01-21 06:00 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 14:40 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-20 16:10 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 16:30 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 16:30 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 22:00 +0100
Re: [RFC/PATCHSET 00/17] perf tools: Add support for hierachy view (v2) Namhyung Kim <namhyung@kernel.org> - 2016-01-20 01:20 +0100
csiph-web