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:
@ -429,9 +429,8 @@ static int event__process_kernel_mmap(event_t *self,
|
||||
} else
|
||||
strcpy(short_module_name, self->mmap.filename);
|
||||
|
||||
map = map_groups__new_module(&machine->kmaps,
|
||||
self->mmap.start,
|
||||
self->mmap.filename, machine);
|
||||
map = machine__new_module(machine, self->mmap.start,
|
||||
self->mmap.filename);
|
||||
if (map == NULL)
|
||||
goto out_problem;
|
||||
|
||||
@ -454,9 +453,7 @@ static int event__process_kernel_mmap(event_t *self,
|
||||
goto out_problem;
|
||||
|
||||
kernel->kernel = kernel_type;
|
||||
if (__map_groups__create_kernel_maps(&machine->kmaps,
|
||||
machine->vmlinux_maps,
|
||||
kernel) < 0)
|
||||
if (__machine__create_kernel_maps(machine, kernel) < 0)
|
||||
goto out_problem;
|
||||
|
||||
event_set_kernel_mmap_len(machine->vmlinux_maps, self);
|
||||
|
Reference in New Issue
Block a user