diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-27 13:29:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-27 14:21:59 -0500 |
commit | 6a4694a433a218c729d336b348a01bfc720da095 (patch) | |
tree | 19c166d8cb244fa0ec504cd49f7de957552ce573 /tools/perf/util/symbol.h | |
parent | 3610583c29563e23dd038d2870f59c88438bf7a3 (diff) |
perf symbols: Better support for multiple symbol tables per dso
By using an array of rb_roots in struct dso we can, from a
struct map instance to get the right symbol rb_tree more easily.
This way we can have just one symbol lookup method for struct
map instances, map__find_symbol, instead of one per symtab type
(functions, variables).
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: <1259346563-12568-6-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 11d41952ce04..8934814d5a64 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -65,8 +65,9 @@ static inline void *symbol__priv(struct symbol *self) | |||
65 | 65 | ||
66 | struct dso { | 66 | struct dso { |
67 | struct list_head node; | 67 | struct list_head node; |
68 | struct rb_root functions; | 68 | struct rb_root symbols[MAP__NR_TYPES]; |
69 | struct symbol *(*find_function)(struct dso *, u64 ip); | 69 | struct symbol *(*find_symbol)(struct dso *self, |
70 | enum map_type type, u64 addr); | ||
70 | u8 adjust_symbols:1; | 71 | u8 adjust_symbols:1; |
71 | u8 slen_calculated:1; | 72 | u8 slen_calculated:1; |
72 | u8 has_build_id:1; | 73 | u8 has_build_id:1; |
@@ -83,8 +84,6 @@ struct dso { | |||
83 | struct dso *dso__new(const char *name); | 84 | struct dso *dso__new(const char *name); |
84 | void dso__delete(struct dso *self); | 85 | void dso__delete(struct dso *self); |
85 | 86 | ||
86 | struct symbol *dso__find_function(struct dso *self, u64 ip); | ||
87 | |||
88 | bool dso__loaded(const struct dso *self, enum map_type type); | 87 | bool dso__loaded(const struct dso *self, enum map_type type); |
89 | 88 | ||
90 | struct dso *dsos__findnew(const char *name); | 89 | struct dso *dsos__findnew(const char *name); |