aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/symbol.c6
-rw-r--r--tools/perf/util/thread.h1
2 files changed, 6 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");
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 3bdd9b2276f0..59b0d9b577d6 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -10,6 +10,7 @@ struct thread {
10 struct rb_root maps[MAP__NR_TYPES]; 10 struct rb_root maps[MAP__NR_TYPES];
11 struct list_head removed_maps[MAP__NR_TYPES]; 11 struct list_head removed_maps[MAP__NR_TYPES];
12 pid_t pid; 12 pid_t pid;
13 bool use_modules;
13 char shortname[3]; 14 char shortname[3];
14 char *comm; 15 char *comm;
15 int comm_len; 16 int comm_len;