aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-27 13:29:16 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-27 14:21:59 -0500
commit3610583c29563e23dd038d2870f59c88438bf7a3 (patch)
treecb8d20387bcc8e37b0db2432f339387a4fd52150 /tools/perf/util/event.h
parent605ca4ba017455d39ac6991c58eb1e80fb8af48d (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.h12
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
83enum map_type {
84 MAP__FUNCTION,
85};
86
83struct map { 87struct 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
113typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); 118typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym);
114 119
115void map__init(struct map *self, u64 start, u64 end, u64 pgoff, 120void map__init(struct map *self, enum map_type type,
116 struct dso *dso); 121 u64 start, u64 end, u64 pgoff, struct dso *dso);
117struct map *map__new(struct mmap_event *event, char *cwd, int cwdlen); 122struct map *map__new(struct mmap_event *event, enum map_type,
123 char *cwd, int cwdlen);
118void map__delete(struct map *self); 124void map__delete(struct map *self);
119struct map *map__clone(struct map *self); 125struct map *map__clone(struct map *self);
120int map__overlap(struct map *l, struct map *r); 126int map__overlap(struct map *l, struct map *r);