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>
This commit is contained in:
@@ -370,7 +370,6 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
|
||||
struct alloc_stat *data = rb_entry(next, struct alloc_stat,
|
||||
node);
|
||||
struct symbol *sym = NULL;
|
||||
struct map_groups *kmaps = &machine->kmaps;
|
||||
struct map *map;
|
||||
char buf[BUFSIZ];
|
||||
u64 addr;
|
||||
@@ -378,8 +377,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
|
||||
if (is_caller) {
|
||||
addr = data->call_site;
|
||||
if (!raw_ip)
|
||||
sym = map_groups__find_function(kmaps, addr,
|
||||
&map, NULL);
|
||||
sym = machine__find_function(machine, addr, &map, NULL);
|
||||
} else
|
||||
addr = data->ptr;
|
||||
|
||||
|
Reference in New Issue
Block a user