aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2009-11-27 16:29:21 -0200
committerIngo Molnar2009-11-27 20:22:01 +0100
commit1de8e24520ffdcf2a90c842eed937f59079a2abd (patch)
treebc64be9e0ad21502d7f9b27e9005fb9c3aec3aee /tools/perf/util/symbol.c
parent95011c600740837288a3b34b411244a4d9157c4e (diff)
perf symbols: When not using modules, discard its symbols
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: <1259346563-12568-10-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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b6a2941e7786..b788c2f5d672 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -381,6 +381,9 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, struct thread
module = strchr(pos->name, '\t');
if (module) {
+ if (!thread->use_modules)
+ goto discard_symbol;
+
*module++ = '\0';
if (strcmp(self->name, module)) {
@@ -420,7 +423,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, struct thread
}
if (filter && filter(curr_map, pos)) {
- rb_erase(&pos->rb_node, root);
+discard_symbol: rb_erase(&pos->rb_node, root);
symbol__delete(pos);
} else {
if (curr_map != map) {
@@ -1635,6 +1638,7 @@ int symbol__init(struct symbol_conf *conf)
return -1;
}
+ kthread->use_modules = pconf->use_modules;
if (pconf->use_modules && thread__create_module_maps(kthread) < 0)
pr_debug("Failed to load list of modules in use, "
"continuing...\n");