aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-04-27 20:20:43 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-27 20:21:18 -0400
commitd28c62232e50eab202bcd3f19b5c7a25b8b900b6 (patch)
tree544aca2fe1c7a6c813cf2bf319a8ceb4d212b649 /tools/perf/util/map.h
parent48ea8f5470aa6f35244d1b218316705ea88c0259 (diff)
perf machine: Adopt some map_groups functions
Those functions operated on members now grouped in 'struct machine', so move those methods to this new class. The changes made to 'perf probe' shows that using this abstraction inserting probes on guests almost got supported for free. Cc: Avi Kivity <avi@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Masami Hiramatsu <mhiramat@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r--tools/perf/util/map.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 6fabad1fd025..881dba4f8203 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -134,6 +134,7 @@ struct machine *machines__find_host(struct rb_root *self);
134struct machine *machines__find(struct rb_root *self, pid_t pid); 134struct machine *machines__find(struct rb_root *self, pid_t pid);
135struct machine *machines__findnew(struct rb_root *self, pid_t pid); 135struct machine *machines__findnew(struct rb_root *self, pid_t pid);
136char *machine__mmap_name(struct machine *self, char *bf, size_t size); 136char *machine__mmap_name(struct machine *self, char *bf, size_t size);
137int machine__init(struct machine *self, const char *root_dir, pid_t pid);
137 138
138/* 139/*
139 * Default guest kernel is defined by parameter --guestkallsyms 140 * Default guest kernel is defined by parameter --guestkallsyms
@@ -172,11 +173,11 @@ struct symbol *map_groups__find_symbol_by_name(struct map_groups *self,
172 struct map **mapp, 173 struct map **mapp,
173 symbol_filter_t filter); 174 symbol_filter_t filter);
174 175
175static inline 176static inline struct symbol *machine__find_function(struct machine *self,
176struct symbol *map_groups__find_function(struct map_groups *self, u64 addr, 177 u64 addr, struct map **mapp,
177 struct map **mapp, symbol_filter_t filter) 178 symbol_filter_t filter)
178{ 179{
179 return map_groups__find_symbol(self, MAP__FUNCTION, addr, mapp, filter); 180 return map_groups__find_symbol(&self->kmaps, MAP__FUNCTION, addr, mapp, filter);
180} 181}
181 182
182static inline 183static inline
@@ -192,8 +193,7 @@ int map_groups__fixup_overlappings(struct map_groups *self, struct map *map,
192 193
193struct map *map_groups__find_by_name(struct map_groups *self, 194struct map *map_groups__find_by_name(struct map_groups *self,
194 enum map_type type, const char *name); 195 enum map_type type, const char *name);
195struct map *map_groups__new_module(struct map_groups *self, u64 start, 196struct map *machine__new_module(struct machine *self, u64 start, const char *filename);
196 const char *filename, struct machine *machine);
197 197
198void map_groups__flush(struct map_groups *self); 198void map_groups__flush(struct map_groups *self);
199 199