diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-12 04:19:53 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-12 06:04:39 -0400 |
commit | 1fe2c1066ce6a30bda7b27785ee3d9b8e62ffbbd (patch) | |
tree | b19630a1a6a2d44a61da0443b0f9de52e42738a6 /tools/perf/util/event.h | |
parent | cd84c2ac6d6425dd4d1b80a2231e534b9b03df18 (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.h | 54 |
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 @@ | |||
1 | #include "../perf.h" | ||
2 | |||
3 | struct ip_event { | ||
4 | struct perf_event_header header; | ||
5 | u64 ip; | ||
6 | u32 pid, tid; | ||
7 | unsigned char __more_data[]; | ||
8 | }; | ||
9 | |||
10 | struct mmap_event { | ||
11 | struct perf_event_header header; | ||
12 | u32 pid, tid; | ||
13 | u64 start; | ||
14 | u64 len; | ||
15 | u64 pgoff; | ||
16 | char filename[PATH_MAX]; | ||
17 | }; | ||
18 | |||
19 | struct comm_event { | ||
20 | struct perf_event_header header; | ||
21 | u32 pid, tid; | ||
22 | char comm[16]; | ||
23 | }; | ||
24 | |||
25 | struct fork_event { | ||
26 | struct perf_event_header header; | ||
27 | u32 pid, ppid; | ||
28 | u32 tid, ptid; | ||
29 | }; | ||
30 | |||
31 | struct lost_event { | ||
32 | struct perf_event_header header; | ||
33 | u64 id; | ||
34 | u64 lost; | ||
35 | }; | ||
36 | |||
37 | struct read_event { | ||
38 | struct perf_event_header header; | ||
39 | u32 pid,tid; | ||
40 | u64 value; | ||
41 | u64 time_enabled; | ||
42 | u64 time_running; | ||
43 | u64 id; | ||
44 | }; | ||
45 | |||
46 | typedef union event_union { | ||
47 | struct perf_event_header header; | ||
48 | struct ip_event ip; | ||
49 | struct mmap_event mmap; | ||
50 | struct comm_event comm; | ||
51 | struct fork_event fork; | ||
52 | struct lost_event lost; | ||
53 | struct read_event read; | ||
54 | } event_t; | ||