• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 		 namespaces			:1,
44 		 __reserved_1			:35;
45 	union {
46 		uint32_t wakeup_events;
47 		uint32_t wakeup_watermark;
48 	};
49 	uint32_t bp_type;
50 	union {
51 		uint64_t bp_addr;
52 		uint64_t config1;
53 	};
54 	/* End of ver 0 - 64 bytes */
55 	union {
56 		uint64_t bp_len;
57 		uint64_t config2;
58 	};
59 	/* End of ver 1 - 72 bytes */
60 	uint64_t branch_sample_type;
61 	/* End of ver 2 - 80 bytes */
62 	uint64_t sample_regs_user;
63 	uint32_t sample_stack_user;
64 	int32_t  clockid;
65 	/* End of ver 3 - 96 bytes */
66 	uint64_t sample_regs_intr;
67 	/* End of ver 4 - 104 bytes */
68 	uint32_t aux_watermark;
69 	uint16_t sample_max_stack;
70 	uint16_t __reserved_2;
71 	/* End of ver 5 - 112 bytes */
72 };
73 
74 struct perf_event_query_bpf {
75         uint32_t ids_len;
76         uint32_t prog_cnt;
77         uint32_t ids[0];
78 };
79 
80 #endif /* !STRACE_LINUX_PERF_EVENT_STRUCT_H */
81