From: Andi Kleen <ak@linux.intel.com>
To: linux-perf-users@vger.kernel.org
Cc: Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 2/2] perf report: Handle non capstone case for calling perf script
Date: Fri, 2 Aug 2024 14:14:18 -0700 [thread overview]
Message-ID: <20240802211530.776055-3-ak@linux.intel.com> (raw)
In-Reply-To: <20240802211530.776055-1-ak@linux.intel.com>
When perf is built without capstone trying to displaying assembler
sample context would error out. Use the older --xed variant in this
case.
Fixes: 659663f0bccc ("perf: script: prefer capstone to XED")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/ui/browsers/scripts.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index e437d7889de6..b130a92053db 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -107,8 +107,13 @@ static int list_scripts(char *script_name, bool *custom,
if (evsel)
attr_to_script(scriptc.extra_format, &evsel->core.attr);
add_script_option("Show individual samples", "", &scriptc);
+#ifdef NO_CAPSTONE
+ add_script_option("Show individual samples with assembler", "-F +insn --xed",
+ &scriptc);
+#else
add_script_option("Show individual samples with assembler", "-F +disasm",
&scriptc);
+#endif
add_script_option("Show individual samples with source", "-F +srcline,+srccode",
&scriptc);
perf_config(scripts_config, &scriptc);
--
2.45.2
prev parent reply other threads:[~2024-08-02 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 21:14 Minor improvements for brstackisn Andi Kleen
2024-08-02 21:14 ` [PATCH 1/2] perf script: Add summary to brstackinsn / brstackdisasm Andi Kleen
2024-08-02 21:14 ` Andi Kleen [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=20240802211530.776055-3-ak@linux.intel.com \
--to=ak@linux.intel.com \
--cc=linux-perf-users@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.