[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1258757489-5978-6-git-send-email-acme@infradead.org>
Date: Fri, 20 Nov 2009 20:51:29 -0200
From: Arnaldo Carvalho de Melo <acme@...radead.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Frédéric Weisbecker <fweisbec@...il.com>,
Mike Galbraith <efault@....de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>
Subject: [PATCH 6/6] perf symbols: Change the kernel DSO name if it comes from kallsyms
From: Arnaldo Carvalho de Melo <acme@...hat.com>
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.
Cc: Frédéric Weisbecker <fweisbec@...il.com>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 9cf6dbc..48f87f0 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)
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);
}
@@ -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);
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists