diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-20 17:51:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-21 08:11:34 -0500 |
commit | ef6ae724253429ac70d81e65d052f6a346d330bd (patch) | |
tree | 743ba1945e6060cc6e549b2eb0210b4492291700 /tools/perf/util/symbol.c | |
parent | fbd733b815a5a57d7eb0d904edc49d18fd12df5c (diff) |
perf symbols: Change the kernel DSO name if it comes from kallsyms
So that the user have a clearer indication about the source of
the symbols, as we only state buildid mismatches in verbose
mode, because 'perf top' would overwrite such warning anyway.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1258757489-5978-6-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 9cf6dbcd158c..48f87f065a2e 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -108,6 +108,8 @@ static size_t symbol__fprintf(struct symbol *self, FILE *fp) | |||
108 | 108 | ||
109 | static void dso__set_long_name(struct dso *self, char *name) | 109 | static void dso__set_long_name(struct dso *self, char *name) |
110 | { | 110 | { |
111 | if (name == NULL) | ||
112 | return; | ||
111 | self->long_name = name; | 113 | self->long_name = name; |
112 | self->long_name_len = strlen(name); | 114 | self->long_name_len = strlen(name); |
113 | } | 115 | } |
@@ -1377,8 +1379,11 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map, | |||
1377 | { | 1379 | { |
1378 | int err = dso__load_vmlinux(self, map, self->name, filter); | 1380 | int err = dso__load_vmlinux(self, map, self->name, filter); |
1379 | 1381 | ||
1380 | if (err <= 0) | 1382 | if (err <= 0) { |
1381 | err = kernel_maps__load_kallsyms(filter); | 1383 | err = kernel_maps__load_kallsyms(filter); |
1384 | if (err > 0) | ||
1385 | dso__set_long_name(self, strdup("[kernel.kallsyms]")); | ||
1386 | } | ||
1382 | 1387 | ||
1383 | if (err > 0) { | 1388 | if (err > 0) { |
1384 | map__fixup_start(map); | 1389 | map__fixup_start(map); |