diff options
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index ee87640b3359..2aea913f7eb7 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -789,7 +789,7 @@ static int symbol_filter(struct map *map, struct symbol *sym) | |||
789 | strstr(name, "_text_end")) | 789 | strstr(name, "_text_end")) |
790 | return 1; | 790 | return 1; |
791 | 791 | ||
792 | syme = dso__sym_priv(map->dso, sym); | 792 | syme = symbol__priv(sym); |
793 | syme->map = map; | 793 | syme->map = map; |
794 | pthread_mutex_init(&syme->source_lock, NULL); | 794 | pthread_mutex_init(&syme->source_lock, NULL); |
795 | if (!sym_filter_entry && sym_filter && !strcmp(name, sym_filter)) | 795 | if (!sym_filter_entry && sym_filter && !strcmp(name, sym_filter)) |
@@ -807,8 +807,7 @@ static int symbol_filter(struct map *map, struct symbol *sym) | |||
807 | 807 | ||
808 | static int parse_symbols(void) | 808 | static int parse_symbols(void) |
809 | { | 809 | { |
810 | if (dsos__load_kernel(vmlinux_name, sizeof(struct sym_entry), | 810 | if (dsos__load_kernel(vmlinux_name, symbol_filter, 1) <= 0) |
811 | symbol_filter, 1) <= 0) | ||
812 | return -1; | 811 | return -1; |
813 | 812 | ||
814 | if (dump_symtab) | 813 | if (dump_symtab) |
@@ -859,7 +858,7 @@ static void event__process_sample(const event_t *self, int counter) | |||
859 | return; | 858 | return; |
860 | } | 859 | } |
861 | 860 | ||
862 | syme = dso__sym_priv(map->dso, sym); | 861 | syme = symbol__priv(sym); |
863 | 862 | ||
864 | if (!syme->skip) { | 863 | if (!syme->skip) { |
865 | syme->count[counter]++; | 864 | syme->count[counter]++; |
@@ -878,8 +877,7 @@ static void event__process_mmap(event_t *self) | |||
878 | struct thread *thread = threads__findnew(self->mmap.pid); | 877 | struct thread *thread = threads__findnew(self->mmap.pid); |
879 | 878 | ||
880 | if (thread != NULL) { | 879 | if (thread != NULL) { |
881 | struct map *map = map__new(&self->mmap, NULL, 0, | 880 | struct map *map = map__new(&self->mmap, NULL, 0); |
882 | sizeof(struct sym_entry)); | ||
883 | if (map != NULL) | 881 | if (map != NULL) |
884 | thread__insert_map(thread, map); | 882 | thread__insert_map(thread, map); |
885 | } | 883 | } |
@@ -1176,7 +1174,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) | |||
1176 | { | 1174 | { |
1177 | int counter; | 1175 | int counter; |
1178 | 1176 | ||
1179 | symbol__init(); | 1177 | symbol__init(sizeof(struct sym_entry)); |
1180 | 1178 | ||
1181 | page_size = sysconf(_SC_PAGE_SIZE); | 1179 | page_size = sysconf(_SC_PAGE_SIZE); |
1182 | 1180 | ||