Commit ea08d8cb authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

perf symbols: Ditch dso->find_symbol

It is always wired to dso__find_symbol.
Signed-off-by: default avatarArnaldo 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: default avatarIngo Molnar <mingo@elte.hu>
parent 79406cd7
...@@ -149,7 +149,7 @@ struct symbol *map__find_symbol(struct map *self, u64 addr, ...@@ -149,7 +149,7 @@ struct symbol *map__find_symbol(struct map *self, u64 addr,
if (!dso__loaded(self->dso, self->type) && map__load(self, filter) < 0) if (!dso__loaded(self->dso, self->type) && map__load(self, filter) < 0)
return NULL; return NULL;
return self->dso->find_symbol(self->dso, self->type, addr); return dso__find_symbol(self->dso, self->type, addr);
} }
struct symbol *map__find_symbol_by_name(struct map *self, const char *name, struct symbol *map__find_symbol_by_name(struct map *self, const char *name,
......
...@@ -30,7 +30,6 @@ enum dso_origin { ...@@ -30,7 +30,6 @@ enum dso_origin {
static void dsos__add(struct list_head *head, struct dso *dso); static void dsos__add(struct list_head *head, struct dso *dso);
static struct map *map__new2(u64 start, struct dso *dso, enum map_type type); static struct map *map__new2(u64 start, struct dso *dso, enum map_type type);
struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr);
static int dso__load_kernel_sym(struct dso *self, struct map *map, static int dso__load_kernel_sym(struct dso *self, struct map *map,
struct map_groups *mg, symbol_filter_t filter); struct map_groups *mg, symbol_filter_t filter);
unsigned int symbol__priv_size; unsigned int symbol__priv_size;
...@@ -186,7 +185,6 @@ struct dso *dso__new(const char *name) ...@@ -186,7 +185,6 @@ struct dso *dso__new(const char *name)
self->short_name = self->name; self->short_name = self->name;
for (i = 0; i < MAP__NR_TYPES; ++i) for (i = 0; i < MAP__NR_TYPES; ++i)
self->symbols[i] = self->symbol_names[i] = RB_ROOT; self->symbols[i] = self->symbol_names[i] = RB_ROOT;
self->find_symbol = dso__find_symbol;
self->slen_calculated = 0; self->slen_calculated = 0;
self->origin = DSO__ORIG_NOT_FOUND; self->origin = DSO__ORIG_NOT_FOUND;
self->loaded = 0; self->loaded = 0;
......
...@@ -76,8 +76,6 @@ struct dso { ...@@ -76,8 +76,6 @@ struct dso {
struct list_head node; struct list_head node;
struct rb_root symbols[MAP__NR_TYPES]; struct rb_root symbols[MAP__NR_TYPES];
struct rb_root symbol_names[MAP__NR_TYPES]; struct rb_root symbol_names[MAP__NR_TYPES];
struct symbol *(*find_symbol)(struct dso *self,
enum map_type type, u64 addr);
u8 adjust_symbols:1; u8 adjust_symbols:1;
u8 slen_calculated:1; u8 slen_calculated:1;
u8 has_build_id:1; u8 has_build_id:1;
...@@ -109,6 +107,7 @@ size_t dso__fprintf_buildid(struct dso *self, FILE *fp); ...@@ -109,6 +107,7 @@ size_t dso__fprintf_buildid(struct dso *self, FILE *fp);
size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp); size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp);
char dso__symtab_origin(const struct dso *self); char dso__symtab_origin(const struct dso *self);
void dso__set_build_id(struct dso *self, void *build_id); void dso__set_build_id(struct dso *self, void *build_id);
struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr);
struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type, struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type,
const char *name); const char *name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment