From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Michael Petlan <mpetlan@redhat.com>,
Ian Rogers <irogers@google.com>, Paul Khuong <pvk@pvk.ca>
Subject: [PATCH 5/5] perf script: Enable IP fields for callchains
Date: Thu, 7 May 2020 11:50:24 +0200 [thread overview]
Message-ID: <20200507095024.2789147-6-jolsa@kernel.org> (raw)
In-Reply-To: <20200507095024.2789147-1-jolsa@kernel.org>
In case the callchains were deleted in pipe mode,
we need to ensure that the IP fields are enabled,
otherwise the callchain is not displayed.
Enabling IP and SYM, which should be enough for
callchains.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/builtin-script.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 5c4a580c048a..ecc8bd4c5e57 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2118,8 +2118,6 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
return 0;
}
- set_print_ip_opts(&evsel->core.attr);
-
if (evsel->core.attr.sample_type) {
err = perf_evsel__check_attr(evsel, scr->session);
if (err)
@@ -2132,6 +2130,13 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
*/
sample_type = perf_evlist__combined_sample_type(evlist);
callchain_param_setup(sample_type);
+
+ /* Enable fields for callchain entries, if it got enabled. */
+ if (callchain_param.record_mode != CALLCHAIN_NONE) {
+ output[output_type(evsel->core.attr.type)].fields |= PERF_OUTPUT_IP |
+ PERF_OUTPUT_SYM;
+ }
+ set_print_ip_opts(&evsel->core.attr);
return 0;
}
--
2.25.4
next prev parent reply other threads:[~2020-05-07 9:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 9:50 [PATCH 0/5] perf tools: Pipe fixes Jiri Olsa
2020-05-07 9:50 ` [PATCH 1/5] perf tools: Do not display extra info when there is nothing to build Jiri Olsa
2020-05-07 14:52 ` Arnaldo Carvalho de Melo
2020-05-07 9:50 ` [PATCH 2/5] perf tools: Do not seek in pipe fd during tracing data processing Jiri Olsa
2020-05-07 9:50 ` [PATCH 3/5] perf session: Try to read pipe data from file Jiri Olsa
2020-05-07 9:50 ` [PATCH 4/5] perf tools: Setup callchain properly in pipe mode Jiri Olsa
2020-05-07 9:50 ` Jiri Olsa [this message]
2020-05-07 15:49 ` [PATCH 0/5] perf tools: Pipe fixes Arnaldo Carvalho de Melo
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=20200507095024.2789147-6-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.org \
--cc=pvk@pvk.ca \
/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