aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
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
381 381
382 module = strchr(pos->name, '\t'); 382 module = strchr(pos->name, '\t');
383 if (module) { 383 if (module) {
384 if (!thread->use_modules)
385 goto discard_symbol;
386
384 *module++ = '\0'; 387 *module++ = '\0';
385 388
386 if (strcmp(self->name, module)) { 389 if (strcmp(self->name, module)) {
@@ -420,7 +423,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, struct thread
420 } 423 }
421 424
422 if (filter && filter(curr_map, pos)) { 425 if (filter && filter(curr_map, pos)) {
423 rb_erase(&pos->rb_node, root); 426discard_symbol: rb_erase(&pos->rb_node, root);
424 symbol__delete(pos); 427 symbol__delete(pos);
425 } else { 428 } else {
426 if (curr_map != map) { 429 if (curr_map != map) {
@@ -1635,6 +1638,7 @@ int symbol__init(struct symbol_conf *conf)
1635 return -1; 1638 return -1;
1636 } 1639 }
1637 1640
1641 kthread->use_modules = pconf->use_modules;
1638 if (pconf->use_modules && thread__create_module_maps(kthread) < 0) 1642 if (pconf->use_modules && thread__create_module_maps(kthread) < 0)
1639 pr_debug("Failed to load list of modules in use, " 1643 pr_debug("Failed to load list of modules in use, "
1640 "continuing...\n"); 1644 "continuing...\n");