From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
Namhyung Kim <namhyung@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andi Kleen <andi@firstfloor.org>, Arun Sharma <asharma@fb.com>,
Rodrigo Campos <rodrigo@sdfg.com.ar>
Subject: [PATCH 19/26] perf top: Add --children option
Date: Fri, 23 May 2014 19:04:16 +0900 [thread overview]
Message-ID: <1400839463-21933-20-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1400839463-21933-1-git-send-email-namhyung@kernel.org>
The --children option is for showing accumulated overhead (period)
value as well as self overhead. It should be used with one of -g or
--call-graph option.
Tested-by: Arun Sharma <asharma@fb.com>
Tested-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Documentation/perf-top.txt | 8 +++++++-
tools/perf/builtin-top.c | 7 +++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index dcfa54c851e9..180ae02137a5 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -119,7 +119,7 @@ Default is to monitor all CPUS.
--fields=::
Specify output field - multiple keys can be specified in CSV format.
Following fields are available:
- overhead, overhead_sys, overhead_us, sample and period.
+ overhead, overhead_sys, overhead_us, overhead_children, sample and period.
Also it can contain any sort key(s).
By default, every sort keys not specified in --field will be appended
@@ -161,6 +161,12 @@ Default is to monitor all CPUS.
Setup and enable call-graph (stack chain/backtrace) recording,
implies -g.
+--children::
+ Accumulate callchain of children to parent entry so that then can
+ show up in the output. The output will have a new "Children" column
+ and will be sorted on the data. It requires -g/--call-graph option
+ enabled.
+
--max-stack::
Set the stack depth limit when parsing the callchain, anything
beyond the specified depth will be ignored. This is a trade-off
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 2465215eff39..3f581a074c3d 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1103,6 +1103,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
OPT_CALLBACK(0, "call-graph", &top.record_opts,
"mode[,dump_size]", record_callchain_help,
&parse_callchain_opt),
+ OPT_BOOLEAN(0, "children", &symbol_conf.cumulate_callchain,
+ "Accumulate callchains of children and show total overhead as well"),
OPT_INTEGER(0, "max-stack", &top.max_stack,
"Set the maximum stack depth when parsing the callchain. "
"Default: " __stringify(PERF_MAX_STACK_DEPTH)),
@@ -1208,6 +1210,11 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
top.sym_evsel = perf_evlist__first(top.evlist);
+ if (!symbol_conf.use_callchain) {
+ symbol_conf.cumulate_callchain = false;
+ perf_hpp__cancel_cumulate();
+ }
+
symbol_conf.priv_size = sizeof(struct annotation);
symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name == NULL);
--
1.9.2
next prev parent reply other threads:[~2014-05-23 10:06 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 10:03 [PATCHSET 00/26] perf tools: Add support to accumulate hist periods (v10) Namhyung Kim
2014-05-23 10:03 ` [PATCH 01/26] perf tools: Introduce struct hist_entry_iter Namhyung Kim
2014-05-26 18:27 ` Jiri Olsa
2014-05-26 18:44 ` Jiri Olsa
2014-05-28 23:46 ` Namhyung Kim
2014-05-23 10:03 ` [PATCH 02/26] perf hists: Add support for accumulated stat of hist entry Namhyung Kim
2014-05-23 10:04 ` [PATCH 03/26] perf hists: Check if accumulated when adding a " Namhyung Kim
2014-05-23 10:04 ` [PATCH 04/26] perf hists: Accumulate hist entry stat based on the callchain Namhyung Kim
2014-05-23 10:04 ` [PATCH 05/26] perf tools: Update cpumode for each cumulative entry Namhyung Kim
2014-05-23 10:04 ` [PATCH 06/26] perf report: Cache cumulative callchains Namhyung Kim
2014-05-23 10:04 ` [PATCH 07/26] perf callchain: Add callchain_cursor_snapshot() Namhyung Kim
2014-05-23 10:04 ` [PATCH 08/26] perf tools: Save callchain info for each cumulative entry Namhyung Kim
2014-05-23 10:04 ` [PATCH 09/26] perf ui/hist: Add support to accumulated hist stat Namhyung Kim
2014-05-23 10:04 ` [PATCH 10/26] perf ui/browser: " Namhyung Kim
2014-05-26 17:52 ` Jiri Olsa
2014-05-28 23:52 ` Namhyung Kim
2014-05-23 10:04 ` [PATCH 11/26] perf ui/gtk: " Namhyung Kim
2014-05-23 10:04 ` [PATCH 12/26] perf tools: Apply percent-limit to cumulative percentage Namhyung Kim
2014-05-26 17:57 ` Jiri Olsa
2014-05-23 10:04 ` [PATCH 13/26] perf tools: Add more hpp helper functions Namhyung Kim
2014-05-23 10:04 ` [PATCH 14/26] perf report: Add --children option Namhyung Kim
2014-05-23 10:04 ` [PATCH 15/26] perf report: Add report.children config option Namhyung Kim
2014-05-23 10:04 ` [PATCH 16/26] perf tools: Do not auto-remove Children column if --fields given Namhyung Kim
2014-05-23 10:04 ` [PATCH 17/26] perf tools: Add callback function to hist_entry_iter Namhyung Kim
2014-05-23 10:04 ` [PATCH 18/26] perf top: Convert " Namhyung Kim
2014-05-23 10:04 ` Namhyung Kim [this message]
2014-05-23 10:04 ` [PATCH 20/26] perf top: Add top.children config option Namhyung Kim
2014-05-23 10:04 ` [PATCH 21/26] perf tools: Enable --children option by default Namhyung Kim
2014-05-23 10:04 ` [PATCH 22/26] perf ui/stdio: Fix invalid percentage value of cumulated hist entries Namhyung Kim
2014-05-23 10:04 ` [PATCH 23/26] perf ui/gtk: Fix callchain display Namhyung Kim
2014-05-23 10:04 ` [PATCH 24/26] perf tools: Reset output/sort order to default Namhyung Kim
2014-05-23 10:04 ` [PATCH 25/26] perf tests: Define and use symbolic names for fake symbols Namhyung Kim
2014-05-23 10:04 ` [PATCH 26/26] perf tests: Add a test case for cumulating callchains Namhyung Kim
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=1400839463-21933-20-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=asharma@fb.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.org \
--cc=rodrigo@sdfg.com.ar \
/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
Powered by JetHome