Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1234867
| From | tip-bot for Adrian Hunter <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf report: Fix sample type validation for synthesized callchains |
| Date | 2015-09-29 11:00 +0200 |
| Message-ID | <qdYVs-1z1-7@gated-at.bofh.it> (permalink) |
| References | <qcBey-2Eq-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: d062ac16f53d1a24047bcc9eded5514a71c363b8
Gitweb: http://git.kernel.org/tip/d062ac16f53d1a24047bcc9eded5514a71c363b8
Author: Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Fri, 25 Sep 2015 16:15:33 +0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 28 Sep 2015 16:42:38 -0300
perf report: Fix sample type validation for synthesized callchains
Processing instruction tracing data (e.g. Intel PT) can synthesize
callchains e.g.
$ perf record -e intel_pt//u uname
$ perf report --stdio --itrace=ige
However perf report's callgraph option gets extra validation, so:
$ perf report --stdio --itrace=ige -gflat
Error:
Selected -g or --branch-history but no callchain data. Did
you call 'perf record' without -g?
# To display the perf.data header info,
# please use --header/--header-only options.
#
Fix the validation to know about instruction tracing options so
above command works.
A side-effect of the change is that the default option to
accumulate the callchain of child functions comes into force.
To get the previous behaviour the --no-children option can be
used e.g.
$ perf report --stdio --itrace=ige -gflat --no-children
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index e4e3f14..0d53b48 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -214,6 +214,12 @@ static int report__setup_sample_type(struct report *rep)
u64 sample_type = perf_evlist__combined_sample_type(session->evlist);
bool is_pipe = perf_data_file__is_pipe(session->file);
+ if (session->itrace_synth_opts->callchain ||
+ (!is_pipe &&
+ perf_header__has_feat(&session->header, HEADER_AUXTRACE) &&
+ !session->itrace_synth_opts->set))
+ sample_type |= PERF_SAMPLE_CALLCHAIN;
+
if (!is_pipe && !(sample_type & PERF_SAMPLE_CALLCHAIN)) {
if (sort__has_parent) {
ui__error("Selected --sort parent, but no "
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 02/25] perf report: Fix sample type validation for synthesized callchains Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200 [tip:perf/core] perf report: Fix sample type validation for synthesized callchains tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 11:00 +0200
csiph-web