Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame^] | 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; |