summaryrefslogtreecommitdiff
path: root/tools/perf/util/event.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-08-12 10:19:53 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2009-08-12 12:04:39 +0200
commit1fe2c1066ce6a30bda7b27785ee3d9b8e62ffbbd (patch)
treeb19630a1a6a2d44a61da0443b0f9de52e42738a6 /tools/perf/util/event.h
parentcd84c2ac6d6425dd4d1b80a2231e534b9b03df18 (diff)
perf tools: Factorize the event structure definitions in a single file
Factorize the multiple definition of the events structures into a single util/event.h file. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Brice Goglin <Brice.Goglin@inria.fr>
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r--tools/perf/util/event.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
new file mode 100644
index 000000000000..91e2fe589f27
--- /dev/null
+++ b/tools/perf/util/event.h
@@ -0,0 +1,54 @@
+#include "../perf.h"
+
+struct ip_event {
+ struct perf_event_header header;
+ u64 ip;
+ u32 pid, tid;
+ unsigned char __more_data[];
+};
+
+struct mmap_event {
+ struct perf_event_header header;
+ u32 pid, tid;
+ u64 start;
+ u64 len;
+ u64 pgoff;
+ char filename[PATH_MAX];
+};
+
+struct comm_event {
+ struct perf_event_header header;
+ u32 pid, tid;
+ char comm[16];
+};
+
+struct fork_event {
+ struct perf_event_header header;
+ u32 pid, ppid;
+ u32 tid, ptid;
+};
+
+struct lost_event {
+ struct perf_event_header header;
+ u64 id;
+ u64 lost;
+};
+
+struct read_event {
+ struct perf_event_header header;
+ u32 pid,tid;
+ u64 value;
+ u64 time_enabled;
+ u64 time_running;
+ u64 id;
+};
+
+typedef union event_union {
+ struct perf_event_header header;
+ struct ip_event ip;
+ struct mmap_event mmap;
+ struct comm_event comm;
+ struct fork_event fork;
+ struct lost_event lost;
+ struct read_event read;
+} event_t;