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/event.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/event.h')
-rw-r--r-- | tools/perf/util/event.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 29543bd88007..3ae3c964c901 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -81,7 +81,9 @@ typedef union event_union { | |||
81 | } event_t; | 81 | } event_t; |
82 | 82 | ||
83 | enum map_type { | 83 | enum map_type { |
84 | MAP__FUNCTION, | 84 | MAP__FUNCTION = 0, |
85 | |||
86 | MAP__NR_TYPES, | ||
85 | }; | 87 | }; |
86 | 88 | ||
87 | struct map { | 89 | struct map { |
@@ -125,10 +127,10 @@ void map__delete(struct map *self); | |||
125 | struct map *map__clone(struct map *self); | 127 | struct map *map__clone(struct map *self); |
126 | int map__overlap(struct map *l, struct map *r); | 128 | int map__overlap(struct map *l, struct map *r); |
127 | size_t map__fprintf(struct map *self, FILE *fp); | 129 | size_t map__fprintf(struct map *self, FILE *fp); |
128 | struct symbol *map__find_function(struct map *self, u64 ip, | 130 | struct symbol *map__find_symbol(struct map *self, u64 addr, |
129 | symbol_filter_t filter); | 131 | symbol_filter_t filter); |
130 | void map__fixup_start(struct map *self, struct rb_root *symbols); | 132 | void map__fixup_start(struct map *self); |
131 | void map__fixup_end(struct map *self, struct rb_root *symbols); | 133 | void map__fixup_end(struct map *self); |
132 | 134 | ||
133 | int event__synthesize_thread(pid_t pid, int (*process)(event_t *event)); | 135 | int event__synthesize_thread(pid_t pid, int (*process)(event_t *event)); |
134 | void event__synthesize_threads(int (*process)(event_t *event)); | 136 | void event__synthesize_threads(int (*process)(event_t *event)); |