From: Song Liu <songliubraving@fb.com>
To: <linux-kernel@vger.kernel.org>
Cc: <kernel-team@fb.com>, <davidca@fb.com>,
Song Liu <songliubraving@fb.com>,
Milian Wolff <milian.wolff@kdab.com>,
Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0
Date: Mon, 10 Jun 2019 16:42:16 -0700 [thread overview]
Message-ID: <20190610234216.2849236-1-songliubraving@fb.com> (raw)
Currently, intel_pt_process_auxtrace_info() sets synth_opts.callchain for
use_browser != -1, which is not accurate after we set use_browser to 0 in
cmd_script(). As a result, the following commands sees a lot more errors
like:
perf record -e intel_pt//u -C 10 -- sleep 3
perf script
...
instruction trace error type 1 time ...
...
This patch fixes this by checking use_browser > 0 instead.
Fixes: c1c9b9695cc8 ("perf script: Allow extended console debug output")
Reported-by: David Carrillo Cisneros <davidca@fb.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
---
tools/perf/util/intel-pt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 6d288237887b..15692c104ca8 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -2588,7 +2588,7 @@ int intel_pt_process_auxtrace_info(union perf_event *event,
} else {
itrace_synth_opts__set_default(&pt->synth_opts,
session->itrace_synth_opts->default_no_sample);
- if (use_browser != -1) {
+ if (use_browser > 0) {
pt->synth_opts.branches = false;
pt->synth_opts.callchain = true;
}
--
2.17.1
next reply other threads:[~2019-06-10 23:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 23:42 Song Liu [this message]
2019-06-11 6:45 ` [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0 Adrian Hunter
2019-06-11 7:18 ` Song Liu
2019-06-11 15:47 ` 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=20190610234216.2849236-1-songliubraving@fb.com \
--to=songliubraving@fb.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=davidca@fb.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=milian.wolff@kdab.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;
as well as URLs for NNTP newsgroup(s).