1 #ifndef STRACE_LINUX_PERF_EVENT_STRUCT_H 2 #define STRACE_LINUX_PERF_EVENT_STRUCT_H 3 4 #include <stdint.h> 5 6 struct perf_event_attr { 7 uint32_t type; 8 uint32_t size; 9 uint64_t config; 10 union { 11 uint64_t sample_period; 12 uint64_t sample_freq; 13 }; 14 uint64_t sample_type; 15 uint64_t read_format; 16 uint64_t disabled :1, 17 inherit :1, 18 pinned :1, 19 exclusive :1, 20 exclude_user :1, 21 exclude_kernel :1, 22 exclude_hv :1, 23 exclude_idle :1, 24 mmap :1, 25 comm :1, 26 freq :1, 27 inherit_stat :1, 28 enable_on_exec :1, 29 task :1, 30 watermark :1, 31 precise_ip :2, 32 mmap_data :1, 33 sample_id_all :1, 34 exclude_host :1, 35 exclude_guest :1, 36 exclude_callchain_kernel :1, 37 exclude_callchain_user :1, 38 mmap2 :1, 39 comm_exec :1, 40 use_clockid :1, 41 context_switch :1, 42 write_backward :1, 43 __reserved_1 :36; 44 union { 45 uint32_t wakeup_events; 46 uint32_t wakeup_watermark; 47 }; 48 uint32_t bp_type; 49 union { 50 uint64_t bp_addr; 51 uint64_t config1; 52 }; 53 /* End of ver 0 - 64 bytes */ 54 union { 55 uint64_t bp_len; 56 uint64_t config2; 57 }; 58 /* End of ver 1 - 72 bytes */ 59 uint64_t branch_sample_type; 60 /* End of ver 2 - 80 bytes */ 61 uint64_t sample_regs_user; 62 uint32_t sample_stack_user; 63 int32_t clockid; 64 /* End of ver 3 - 96 bytes */ 65 uint64_t sample_regs_intr; 66 /* End of ver 4 - 104 bytes */ 67 uint32_t aux_watermark; 68 uint16_t sample_max_stack; 69 uint16_t __reserved_2; 70 /* End of ver 5 - 112 bytes */ 71 }; 72 73 #endif /* !STRACE_LINUX_PERF_EVENT_STRUCT_H */ 74