summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-04-27 21:20:43 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-27 21:21:18 -0300
commitd28c62232e50eab202bcd3f19b5c7a25b8b900b6 (patch)
tree544aca2fe1c7a6c813cf2bf319a8ceb4d212b649 /tools/perf/util/map.h
parent48ea8f5470aa6f35244d1b218316705ea88c0259 (diff)
downloadlinux-stable-d28c62232e50eab202bcd3f19b5c7a25b8b900b6.tar.gz
linux-stable-d28c62232e50eab202bcd3f19b5c7a25b8b900b6.tar.bz2
linux-stable-d28c62232e50eab202bcd3f19b5c7a25b8b900b6.zip
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);
struct machine *machines__find(struct rb_root *self, pid_t pid);
struct machine *machines__findnew(struct rb_root *self, pid_t pid);
char *machine__mmap_name(struct machine *self, char *bf, size_t size);
+int machine__init(struct machine *self, const char *root_dir, pid_t pid);
/*
* Default guest kernel is defined by parameter --guestkallsyms
@@ -172,11 +173,11 @@ struct symbol *map_groups__find_symbol_by_name(struct map_groups *self,
struct map **mapp,
symbol_filter_t filter);
-static inline
-struct symbol *map_groups__find_function(struct map_groups *self, u64 addr,
- struct map **mapp, symbol_filter_t filter)
+static inline struct symbol *machine__find_function(struct machine *self,
+ u64 addr, struct map **mapp,
+ symbol_filter_t filter)
{
- return map_groups__find_symbol(self, MAP__FUNCTION, addr, mapp, filter);
+ return map_groups__find_symbol(&self->kmaps, MAP__FUNCTION, addr, mapp, filter);
}
static inline
@@ -192,8 +193,7 @@ int map_groups__fixup_overlappings(struct map_groups *self, struct map *map,
struct map *map_groups__find_by_name(struct map_groups *self,
enum map_type type, const char *name);
-struct map *map_groups__new_module(struct map_groups *self, u64 start,
- const char *filename, struct machine *machine);
+struct map *machine__new_module(struct machine *self, u64 start, const char *filename);
void map_groups__flush(struct map_groups *self);