From: Martin Vuille <jpmv27@aim.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 1/1] perf annotate: Don't prepend symfs path to vmlinux path
Date: Sun, 11 Feb 2018 15:32:10 -0500 [thread overview]
Message-ID: <20180211203210.12738-2-jpmv27@aim.com> (raw)
In-Reply-To: <20180211203210.12738-1-jpmv27@aim.com>
When selecting the filename to pass to objdump for disassembly, if there is
no entry for vmlinux in the build-id cache then the fallback code prepends
symfs path to vmlinux path. If the vmlinux option was specified, this is
unnecessary and, as a result, vmlinux is not found.
Don't prepend symfs path if DSO is [kernel.kallsyms]
Signed-off-by: Martin Vuille <jpmv27@aim.com>
---
tools/perf/util/annotate.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 425b7f0760ec..0b78cc4fb155 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1412,7 +1412,14 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
* cache, or is just a kallsyms file, well, lets hope that this
* DSO is the same as when 'perf record' ran.
*/
- __symbol__join_symfs(filename, filename_size, dso->long_name);
+ if (!strstr(dso->short_name, DSO__NAME_KALLSYMS))
+ {
+ __symbol__join_symfs(filename, filename_size, dso->long_name);
+ }
+ else
+ {
+ scnprintf(filename, filename_size, "%s", dso->long_name);
+ }
}
free(build_id_path);
--
2.13.6
prev parent reply other threads:[~2018-02-11 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-11 20:32 [RFC PATCH 0/1] " Martin Vuille
2018-02-11 20:32 ` Martin Vuille [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=20180211203210.12738-2-jpmv27@aim.com \
--to=jpmv27@aim.com \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®