Skip to content

Commit

Permalink
perf symbols: Change the kernel DSO name if it comes from kallsyms
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Nov 21, 2009
1 parent fbd733b commit ef6ae72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ static size_t symbol__fprintf(struct symbol *self, FILE *fp)

static void dso__set_long_name(struct dso *self, char *name)
{
if (name == NULL)
return;
self->long_name = name;
self->long_name_len = strlen(name);
}
Expand Down Expand Up @@ -1377,8 +1379,11 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
{
int err = dso__load_vmlinux(self, map, self->name, filter);

if (err <= 0)
if (err <= 0) {
err = kernel_maps__load_kallsyms(filter);
if (err > 0)
dso__set_long_name(self, strdup("[kernel.kallsyms]"));
}

if (err > 0) {
map__fixup_start(map);
Expand Down

0 comments on commit ef6ae72

Please sign in to comment.