aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-24 10:01:52 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-24 10:37:03 -0500
commitfcf1203a919c3a3d212c0ed01f5240fd592bf5ae (patch)
treebd7a9f796882c5b01fabc4afe2bdea6ac74c2098 /tools/perf/util/map.c
parent727dad10c17cbaade3cb6a56bd4863a4630f4d13 (diff)
perf symbols: Rename find_symbol routines to find_function
Paving the way for supporting variable in adition to function symbols. 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: <1259074912-5924-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 09412321a80d..41c5c4a20010 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -80,18 +80,18 @@ void map__delete(struct map *self)
80 free(self); 80 free(self);
81} 81}
82 82
83void map__fixup_start(struct map *self) 83void map__fixup_start(struct map *self, struct rb_root *symbols)
84{ 84{
85 struct rb_node *nd = rb_first(&self->dso->syms); 85 struct rb_node *nd = rb_first(symbols);
86 if (nd != NULL) { 86 if (nd != NULL) {
87 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); 87 struct symbol *sym = rb_entry(nd, struct symbol, rb_node);
88 self->start = sym->start; 88 self->start = sym->start;
89 } 89 }
90} 90}
91 91
92void map__fixup_end(struct map *self) 92void map__fixup_end(struct map *self, struct rb_root *symbols)
93{ 93{
94 struct rb_node *nd = rb_last(&self->dso->syms); 94 struct rb_node *nd = rb_last(symbols);
95 if (nd != NULL) { 95 if (nd != NULL) {
96 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); 96 struct symbol *sym = rb_entry(nd, struct symbol, rb_node);
97 self->end = sym->end; 97 self->end = sym->end;
@@ -100,8 +100,8 @@ void map__fixup_end(struct map *self)
100 100
101#define DSO__DELETED "(deleted)" 101#define DSO__DELETED "(deleted)"
102 102
103struct symbol * 103struct symbol *map__find_function(struct map *self, u64 ip,
104map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter) 104 symbol_filter_t filter)
105{ 105{
106 if (!self->dso->loaded) { 106 if (!self->dso->loaded) {
107 int nr = dso__load(self->dso, self, filter); 107 int nr = dso__load(self->dso, self, filter);
@@ -136,7 +136,7 @@ map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter)
136 } 136 }
137 } 137 }
138 138
139 return self->dso->find_symbol(self->dso, ip); 139 return self->dso->find_function(self->dso, ip);
140} 140}
141 141
142struct map *map__clone(struct map *self) 142struct map *map__clone(struct map *self)