From b42998febcb59c862e196cf9fe3db2a72bca7e69 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 27 Nov 2009 16:29:21 -0200 Subject: [PATCH] --- yaml --- r: 169824 b: refs/heads/master c: 1de8e24520ffdcf2a90c842eed937f59079a2abd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/util/symbol.c | 6 +++++- trunk/tools/perf/util/thread.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5d0876ecb821..f09485218bca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 95011c600740837288a3b34b411244a4d9157c4e +refs/heads/master: 1de8e24520ffdcf2a90c842eed937f59079a2abd diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index b6a2941e7786..b788c2f5d672 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/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"); diff --git a/trunk/tools/perf/util/thread.h b/trunk/tools/perf/util/thread.h index 3bdd9b2276f0..59b0d9b577d6 100644 --- a/trunk/tools/perf/util/thread.h +++ b/trunk/tools/perf/util/thread.h @@ -10,6 +10,7 @@ struct thread { struct rb_root maps[MAP__NR_TYPES]; struct list_head removed_maps[MAP__NR_TYPES]; pid_t pid; + bool use_modules; char shortname[3]; char *comm; int comm_len;