[PATCH 2/2] perf symbols: Use the right variable to check for kallsyms in the cache

From: Arnaldo Carvalho de Melo
Date: Fri Jan 22 2010 - 11:35:25 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

Probably this wasn't noticed when testing this on my parisc machine
because I must have copied manually to its cache the vmlinux file used
in the x86_64 machine, now that I tried looking on a x86-32 machine with
a fresh cache, kernel symbols weren't being resolved even with the right
kallsyms copy on its cache, duh.

Cc: FrÃdÃric Weisbecker <fweisbec@xxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 1270cf8..f1f609d 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1650,12 +1650,12 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
getenv("HOME"), sbuild_id) == -1)
return -1;

+ kallsyms_filename = kallsyms_allocated_filename;
+
if (access(kallsyms_filename, F_OK)) {
free(kallsyms_allocated_filename);
return -1;
}
-
- kallsyms_filename = kallsyms_allocated_filename;
} else {
/*
* Last resort, if we don't have a build-id and couldn't find
--
1.6.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/