From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Stephane Eranian <eranian@google.com>,
Andi Kleen <andi@firstfloor.org>, Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 14/14] perf top: Add --hierarchy option
Date: Tue, 26 Jan 2016 01:46:07 +0900 [thread overview]
Message-ID: <1453740367-10901-15-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1453740367-10901-1-git-send-email-namhyung@kernel.org>
Support hierarchy output for perf-top using --hierarchy option.
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Documentation/perf-top.txt | 3 +++
tools/perf/builtin-top.c | 15 +++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index b0e60e17db38..19f046f027cd 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -233,6 +233,9 @@ Default is to monitor all CPUS.
--raw-trace::
When displaying traceevent output, do not use print fmt or plugins.
+--hierarchy::
+ Enable hierarchy output.
+
INTERACTIVE PROMPTING KEYS
--------------------------
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index bf01cbb0ef23..5da5b098f141 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1212,6 +1212,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
parse_branch_stack),
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()
};
const char * const top_usage[] = {
@@ -1239,6 +1241,19 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
goto out_delete_evlist;
}
+ 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(top_usage, options, "fields", 0);
+ parse_options_usage(NULL, options, "hierarchy", 0);
+ goto out_delete_evlist;
+ }
+ }
+
sort__mode = SORT_MODE__TOP;
/* display thread wants entries to be collapsed in a different tree */
sort__need_collapse = 1;
--
2.6.4
prev parent reply other threads:[~2016-01-25 16:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 16:45 [PATCHSET 00/14] perf tools: Add support for hierachy view (v3) Namhyung Kim
2016-01-25 16:45 ` [PATCH 01/14] perf hists: Basic support of hierarchical report view Namhyung Kim
2016-01-25 16:45 ` [PATCH 02/14] perf hists: Resort hist entries with hierarchy Namhyung Kim
2016-01-25 16:45 ` [PATCH 03/14] perf hists: Add helper functions for hierarchy mode Namhyung Kim
2016-01-25 16:45 ` [PATCH 04/14] perf hists: Support filtering in " Namhyung Kim
2016-01-25 16:45 ` [PATCH 05/14] perf ui/stdio: Implement hierarchy output mode Namhyung Kim
2016-01-25 16:45 ` [PATCH 06/14] perf ui/stdio: Align column header for hierarchy output Namhyung Kim
2016-01-25 16:46 ` [PATCH 07/14] perf hists browser: Count number of hierarchy entries Namhyung Kim
2016-01-25 16:46 ` [PATCH 08/14] perf hists browser: Support collapsing/expanding whole entries in hierarchy Namhyung Kim
2016-01-25 16:46 ` [PATCH 09/14] perf hists browser: Implement hierarchy output Namhyung Kim
2016-01-25 16:46 ` [PATCH 10/14] perf hists browser: Align column header in hierarchy mode Namhyung Kim
2016-01-25 16:46 ` [PATCH 11/14] perf ui/gtk: Implement hierarchy output mode Namhyung Kim
2016-01-25 16:46 ` [PATCH 12/14] perf report: Add --hierarchy option Namhyung Kim
2016-01-25 16:46 ` [PATCH 13/14] perf hists: Support decaying in hierarchy mode Namhyung Kim
2016-01-25 16:46 ` Namhyung Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453740367-10901-15-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®