diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-27 13:29:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-27 14:21:59 -0500 |
commit | 3610583c29563e23dd038d2870f59c88438bf7a3 (patch) | |
tree | cb8d20387bcc8e37b0db2432f339387a4fd52150 /tools/perf/util/event.h | |
parent | 605ca4ba017455d39ac6991c58eb1e80fb8af48d (diff) |
perf symbols: Add a 'type' field to struct map
That way we will be able to check if the right symtab is loaded
in the underlying DSO.
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-5-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, 9 insertions, 3 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 882a9531db97..29543bd88007 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -80,6 +80,10 @@ typedef union event_union { | |||
80 | struct sample_event sample; | 80 | struct sample_event sample; |
81 | } event_t; | 81 | } event_t; |
82 | 82 | ||
83 | enum map_type { | ||
84 | MAP__FUNCTION, | ||
85 | }; | ||
86 | |||
83 | struct map { | 87 | struct map { |
84 | union { | 88 | union { |
85 | struct rb_node rb_node; | 89 | struct rb_node rb_node; |
@@ -87,6 +91,7 @@ struct map { | |||
87 | }; | 91 | }; |
88 | u64 start; | 92 | u64 start; |
89 | u64 end; | 93 | u64 end; |
94 | enum map_type type; | ||
90 | u64 pgoff; | 95 | u64 pgoff; |
91 | u64 (*map_ip)(struct map *, u64); | 96 | u64 (*map_ip)(struct map *, u64); |
92 | u64 (*unmap_ip)(struct map *, u64); | 97 | u64 (*unmap_ip)(struct map *, u64); |
@@ -112,9 +117,10 @@ struct symbol; | |||
112 | 117 | ||
113 | typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); | 118 | typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); |
114 | 119 | ||
115 | void map__init(struct map *self, u64 start, u64 end, u64 pgoff, | 120 | void map__init(struct map *self, enum map_type type, |
116 | struct dso *dso); | 121 | u64 start, u64 end, u64 pgoff, struct dso *dso); |
117 | struct map *map__new(struct mmap_event *event, char *cwd, int cwdlen); | 122 | struct map *map__new(struct mmap_event *event, enum map_type, |
123 | char *cwd, int cwdlen); | ||
118 | void map__delete(struct map *self); | 124 | void map__delete(struct map *self); |
119 | struct map *map__clone(struct map *self); | 125 | struct map *map__clone(struct map *self); |
120 | int map__overlap(struct map *l, struct map *r); | 126 | int map__overlap(struct map *l, struct map *r); |