aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.c
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/event.c
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/event.c')
-rw-r--r--tools/perf/util/event.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 7400e5147e13..1757b0ffeaa9 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -429,9 +429,8 @@ static int event__process_kernel_mmap(event_t *self,
429 } else 429 } else
430 strcpy(short_module_name, self->mmap.filename); 430 strcpy(short_module_name, self->mmap.filename);
431 431
432 map = map_groups__new_module(&machine->kmaps, 432 map = machine__new_module(machine, self->mmap.start,
433 self->mmap.start, 433 self->mmap.filename);
434 self->mmap.filename, machine);
435 if (map == NULL) 434 if (map == NULL)
436 goto out_problem; 435 goto out_problem;
437 436
@@ -454,9 +453,7 @@ static int event__process_kernel_mmap(event_t *self,
454 goto out_problem; 453 goto out_problem;
455 454
456 kernel->kernel = kernel_type; 455 kernel->kernel = kernel_type;
457 if (__map_groups__create_kernel_maps(&machine->kmaps, 456 if (__machine__create_kernel_maps(machine, kernel) < 0)
458 machine->vmlinux_maps,
459 kernel) < 0)
460 goto out_problem; 457 goto out_problem;
461 458
462 event_set_kernel_mmap_len(machine->vmlinux_maps, self); 459 event_set_kernel_mmap_len(machine->vmlinux_maps, self);