summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-10-06 21:26:02 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-06 21:34:13 +0200
commitb0a7d1a0cd2e228dc06d099db2e1bb02f1b7d591 (patch)
treee943d42d36229261829b7c51978ecd1ee649a59a /tools/perf/util/machine.h
parentperf sched: Handle PERF_RECORD_EXIT events (diff)
downloadlinux-b0a7d1a0cd2e228dc06d099db2e1bb02f1b7d591.tar.xz
linux-b0a7d1a0cd2e228dc06d099db2e1bb02f1b7d591.zip
perf machine: Carve up event processing specific from perf_tool
The perf_tool vtable expects methods that receive perf_tool and perf_sample entries, but for tools not interested in doing any special processing on non PERF_RECORD_SAMPLE events, like 'perf top', and for those not using perf_session, like 'perf trace', they were using perf_event__process passing tool and sample paramenters that were just not used. Provide 'machine' methods for this purpose and make the perf_event ones use them. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ot9cc6mt025o8kbngzckcrx9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.h')
-rw-r--r--tools/perf/util/machine.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 54df0cdd3000..df152f1768be 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -5,7 +5,15 @@
struct thread;
struct machine;
+union perf_event;
struct thread *machine__find_thread(struct machine *machine, pid_t pid);
+int machine__process_comm_event(struct machine *machine, union perf_event *event);
+int machine__process_exit_event(struct machine *machine, union perf_event *event);
+int machine__process_fork_event(struct machine *machine, union perf_event *event);
+int machine__process_lost_event(struct machine *machine, union perf_event *event);
+int machine__process_mmap_event(struct machine *machine, union perf_event *event);
+int machine__process_event(struct machine *machine, union perf_event *event);
+
#endif /* __PERF_MACHINE_H */