提交 5698d2c9 编写于 作者: N Namhyung Kim 提交者: Arnaldo Carvalho de Melo

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: NKwanghyun Yoo <ykh815.yoo@lge.com>
Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
Acked-by: NDavid 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.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 ab4ecda5
...@@ -888,8 +888,11 @@ int dso__load_vmlinux(struct dso *dso, struct map *map, ...@@ -888,8 +888,11 @@ int dso__load_vmlinux(struct dso *dso, struct map *map,
char symfs_vmlinux[PATH_MAX]; char symfs_vmlinux[PATH_MAX];
enum dso_binary_type symtab_type; enum dso_binary_type symtab_type;
snprintf(symfs_vmlinux, sizeof(symfs_vmlinux), "%s%s", if (vmlinux[0] == '/')
symbol_conf.symfs, vmlinux); 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) if (dso->kernel == DSO_TYPE_GUEST_KERNEL)
symtab_type = DSO_BINARY_TYPE__GUEST_VMLINUX; symtab_type = DSO_BINARY_TYPE__GUEST_VMLINUX;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册