diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-11 15:56:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-12 01:42:11 -0500 |
commit | ea08d8cbd162fe3756e3e2298efbe0b8b12f92d1 (patch) | |
tree | 9b9eb4311da9c58cf0cd96d471ee2ad8ec3ffd61 /tools/perf/util | |
parent | 79406cd789f745ac6aa9d597895f904a98a14007 (diff) |
perf symbols: Ditch dso->find_symbol
It is always wired to dso__find_symbol.
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: <1260564999-13371-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/map.c | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 3 |
3 files changed, 2 insertions, 5 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 175f1f6b6914..76bdca640a9b 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c | |||
@@ -149,7 +149,7 @@ struct symbol *map__find_symbol(struct map *self, u64 addr, | |||
149 | if (!dso__loaded(self->dso, self->type) && map__load(self, filter) < 0) | 149 | if (!dso__loaded(self->dso, self->type) && map__load(self, filter) < 0) |
150 | return NULL; | 150 | return NULL; |
151 | 151 | ||
152 | return self->dso->find_symbol(self->dso, self->type, addr); | 152 | return dso__find_symbol(self->dso, self->type, addr); |
153 | } | 153 | } |
154 | 154 | ||
155 | struct symbol *map__find_symbol_by_name(struct map *self, const char *name, | 155 | struct symbol *map__find_symbol_by_name(struct map *self, const char *name, |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 8134c49deae6..d3d9fed74f1d 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -30,7 +30,6 @@ enum dso_origin { | |||
30 | 30 | ||
31 | static void dsos__add(struct list_head *head, struct dso *dso); | 31 | static void dsos__add(struct list_head *head, struct dso *dso); |
32 | static struct map *map__new2(u64 start, struct dso *dso, enum map_type type); | 32 | static struct map *map__new2(u64 start, struct dso *dso, enum map_type type); |
33 | struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr); | ||
34 | static int dso__load_kernel_sym(struct dso *self, struct map *map, | 33 | static int dso__load_kernel_sym(struct dso *self, struct map *map, |
35 | struct map_groups *mg, symbol_filter_t filter); | 34 | struct map_groups *mg, symbol_filter_t filter); |
36 | unsigned int symbol__priv_size; | 35 | unsigned int symbol__priv_size; |
@@ -186,7 +185,6 @@ struct dso *dso__new(const char *name) | |||
186 | self->short_name = self->name; | 185 | self->short_name = self->name; |
187 | for (i = 0; i < MAP__NR_TYPES; ++i) | 186 | for (i = 0; i < MAP__NR_TYPES; ++i) |
188 | self->symbols[i] = self->symbol_names[i] = RB_ROOT; | 187 | self->symbols[i] = self->symbol_names[i] = RB_ROOT; |
189 | self->find_symbol = dso__find_symbol; | ||
190 | self->slen_calculated = 0; | 188 | self->slen_calculated = 0; |
191 | self->origin = DSO__ORIG_NOT_FOUND; | 189 | self->origin = DSO__ORIG_NOT_FOUND; |
192 | self->loaded = 0; | 190 | self->loaded = 0; |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 51c401307bf1..cf99f88adf39 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -76,8 +76,6 @@ struct dso { | |||
76 | struct list_head node; | 76 | struct list_head node; |
77 | struct rb_root symbols[MAP__NR_TYPES]; | 77 | struct rb_root symbols[MAP__NR_TYPES]; |
78 | struct rb_root symbol_names[MAP__NR_TYPES]; | 78 | struct rb_root symbol_names[MAP__NR_TYPES]; |
79 | struct symbol *(*find_symbol)(struct dso *self, | ||
80 | enum map_type type, u64 addr); | ||
81 | u8 adjust_symbols:1; | 79 | u8 adjust_symbols:1; |
82 | u8 slen_calculated:1; | 80 | u8 slen_calculated:1; |
83 | u8 has_build_id:1; | 81 | u8 has_build_id:1; |
@@ -109,6 +107,7 @@ size_t dso__fprintf_buildid(struct dso *self, FILE *fp); | |||
109 | size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp); | 107 | size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp); |
110 | char dso__symtab_origin(const struct dso *self); | 108 | char dso__symtab_origin(const struct dso *self); |
111 | void dso__set_build_id(struct dso *self, void *build_id); | 109 | void dso__set_build_id(struct dso *self, void *build_id); |
110 | struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr); | ||
112 | struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type, | 111 | struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type, |
113 | const char *name); | 112 | const char *name); |
114 | 113 | ||