From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
hpa@zytor.com, mingo@kernel.org, ykh815.yoo@lge.com,
a.p.zijlstra@chello.nl, namhyung.kim@lge.com,
namhyung@kernel.org, jolsa@redhat.com, dsahern@gmail.com,
tglx@linutronix.de
Subject: [tip:perf/core] perf symbols: Do not apply symfs for an absolute vmlinux path
Date: Fri, 19 Jul 2013 00:53:51 -0700 [thread overview]
Message-ID: <tip-5698d2c99ec11006b4c241ebad5252289902b358@git.kernel.org> (raw)
In-Reply-To: <1374048495-3643-1-git-send-email-namhyung@kernel.org>
Commit-ID: 5698d2c99ec11006b4c241ebad5252289902b358
Gitweb: http://git.kernel.org/tip/5698d2c99ec11006b4c241ebad5252289902b358
Author: Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Wed, 17 Jul 2013 17:08:15 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 17 Jul 2013 12:23:57 -0300
perf symbols: Do not apply symfs for an absolute vmlinux path
If an user gives both of --symfs and --vmlinux option, the vmlinux will
be searched under the symfs directory. This is somewhat confusing since
vmlinux often lives in kernel build directory or somewhere other than
user space binaries.
So it'd be better not adding symfs prefix for a vmlinux if it has an
absolute pathname.
Reported-by: Kwanghyun Yoo <ykh815.yoo@lge.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1374048495-3643-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index d5528e1..02718e7 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -888,8 +888,11 @@ int dso__load_vmlinux(struct dso *dso, struct map *map,
char symfs_vmlinux[PATH_MAX];
enum dso_binary_type symtab_type;
- snprintf(symfs_vmlinux, sizeof(symfs_vmlinux), "%s%s",
- symbol_conf.symfs, vmlinux);
+ if (vmlinux[0] == '/')
+ snprintf(symfs_vmlinux, sizeof(symfs_vmlinux), "%s", vmlinux);
+ else
+ snprintf(symfs_vmlinux, sizeof(symfs_vmlinux), "%s%s",
+ symbol_conf.symfs, vmlinux);
if (dso->kernel == DSO_TYPE_GUEST_KERNEL)
symtab_type = DSO_BINARY_TYPE__GUEST_VMLINUX;
prev parent reply other threads:[~2013-07-19 7:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 8:08 [PATCH] perf symbol: Do not apply symfs for an absolute vmlinux path Namhyung Kim
2013-07-17 13:31 ` David Ahern
2013-07-17 15:29 ` Arnaldo Carvalho de Melo
2013-07-19 7:53 ` tip-bot for Namhyung Kim [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=tip-5698d2c99ec11006b4c241ebad5252289902b358@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=ykh815.yoo@lge.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).