1 | //! Types and constants used with `perf_event_open`. |
2 | //! |
3 | //! This module contains types and constants for use with the |
4 | //! [`perf_event_open`][man] system call. These are automatically generated from |
5 | //! the header files `<linux/perf_event.h>` and `<linux/hw_breakpoint.h>` by the |
6 | //! Rust [`bindgen`][bindgen] tool. |
7 | //! |
8 | //! It's not always obvious how `bindgen` will choose to reflect a given C |
9 | //! construct into Rust. The best approach I've found is simply to search |
10 | //! [the source code][src] for the C identifier name and see what `bindgen` did |
11 | //! with it. |
12 | //! |
13 | //! [man]: http://man7.org/linux/man-pages/man2/perf_event_open.2.html |
14 | //! [bindgen]: https://github.com/rust-lang/rust-bindgen |
15 | //! [src]: ../../src/perf_event_open_sys/bindings.rs.html |
16 | |
17 | #![allow (dead_code)] |
18 | #![allow (non_upper_case_globals)] |
19 | #![allow (non_camel_case_types)] |
20 | #![allow (non_snake_case)] |
21 | #![allow (deref_nullptr)] // `bindgen_test_layout` tests use bogus code |
22 | #![allow (clippy::missing_safety_doc)] |
23 | #![allow (clippy::too_many_arguments)] |
24 | #![allow (clippy::useless_transmute)] |
25 | |
26 | /* automatically generated by rust-bindgen 0.59.2 */ |
27 | |
28 | #[repr (C)] |
29 | #[derive (Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] |
30 | pub struct __BindgenBitfieldUnit<Storage> { |
31 | storage: Storage, |
32 | } |
33 | impl<Storage> __BindgenBitfieldUnit<Storage> { |
34 | #[inline ] |
35 | pub const fn new(storage: Storage) -> Self { |
36 | Self { storage } |
37 | } |
38 | } |
39 | impl<Storage> __BindgenBitfieldUnit<Storage> |
40 | where |
41 | Storage: AsRef<[u8]> + AsMut<[u8]>, |
42 | { |
43 | #[inline ] |
44 | pub fn get_bit(&self, index: usize) -> bool { |
45 | debug_assert!(index / 8 < self.storage.as_ref().len()); |
46 | let byte_index = index / 8; |
47 | let byte = self.storage.as_ref()[byte_index]; |
48 | let bit_index = if cfg!(target_endian = "big" ) { |
49 | 7 - (index % 8) |
50 | } else { |
51 | index % 8 |
52 | }; |
53 | let mask = 1 << bit_index; |
54 | byte & mask == mask |
55 | } |
56 | #[inline ] |
57 | pub fn set_bit(&mut self, index: usize, val: bool) { |
58 | debug_assert!(index / 8 < self.storage.as_ref().len()); |
59 | let byte_index = index / 8; |
60 | let byte = &mut self.storage.as_mut()[byte_index]; |
61 | let bit_index = if cfg!(target_endian = "big" ) { |
62 | 7 - (index % 8) |
63 | } else { |
64 | index % 8 |
65 | }; |
66 | let mask = 1 << bit_index; |
67 | if val { |
68 | *byte |= mask; |
69 | } else { |
70 | *byte &= !mask; |
71 | } |
72 | } |
73 | #[inline ] |
74 | pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { |
75 | debug_assert!(bit_width <= 64); |
76 | debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); |
77 | debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); |
78 | let mut val = 0; |
79 | for i in 0..(bit_width as usize) { |
80 | if self.get_bit(i + bit_offset) { |
81 | let index = if cfg!(target_endian = "big" ) { |
82 | bit_width as usize - 1 - i |
83 | } else { |
84 | i |
85 | }; |
86 | val |= 1 << index; |
87 | } |
88 | } |
89 | val |
90 | } |
91 | #[inline ] |
92 | pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { |
93 | debug_assert!(bit_width <= 64); |
94 | debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); |
95 | debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); |
96 | for i in 0..(bit_width as usize) { |
97 | let mask = 1 << i; |
98 | let val_bit_is_set = val & mask == mask; |
99 | let index = if cfg!(target_endian = "big" ) { |
100 | bit_width as usize - 1 - i |
101 | } else { |
102 | i |
103 | }; |
104 | self.set_bit(index + bit_offset, val_bit_is_set); |
105 | } |
106 | } |
107 | } |
108 | #[repr (C)] |
109 | #[derive (Default)] |
110 | pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]); |
111 | impl<T> __IncompleteArrayField<T> { |
112 | #[inline ] |
113 | pub const fn new() -> Self { |
114 | __IncompleteArrayField(::std::marker::PhantomData, []) |
115 | } |
116 | #[inline ] |
117 | pub fn as_ptr(&self) -> *const T { |
118 | self as *const _ as *const T |
119 | } |
120 | #[inline ] |
121 | pub fn as_mut_ptr(&mut self) -> *mut T { |
122 | self as *mut _ as *mut T |
123 | } |
124 | #[inline ] |
125 | pub unsafe fn as_slice(&self, len: usize) -> &[T] { |
126 | ::std::slice::from_raw_parts(self.as_ptr(), len) |
127 | } |
128 | #[inline ] |
129 | pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { |
130 | ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) |
131 | } |
132 | } |
133 | impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> { |
134 | fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
135 | fmt.write_str(data:"__IncompleteArrayField" ) |
136 | } |
137 | } |
138 | pub const __BITS_PER_LONG: u32 = 64; |
139 | pub const __FD_SETSIZE: u32 = 1024; |
140 | pub const _IOC_NRBITS: u32 = 8; |
141 | pub const _IOC_TYPEBITS: u32 = 8; |
142 | pub const _IOC_SIZEBITS: u32 = 14; |
143 | pub const _IOC_DIRBITS: u32 = 2; |
144 | pub const _IOC_NRMASK: u32 = 255; |
145 | pub const _IOC_TYPEMASK: u32 = 255; |
146 | pub const _IOC_SIZEMASK: u32 = 16383; |
147 | pub const _IOC_DIRMASK: u32 = 3; |
148 | pub const _IOC_NRSHIFT: u32 = 0; |
149 | pub const _IOC_TYPESHIFT: u32 = 8; |
150 | pub const _IOC_SIZESHIFT: u32 = 16; |
151 | pub const _IOC_DIRSHIFT: u32 = 30; |
152 | pub const _IOC_NONE: u32 = 0; |
153 | pub const _IOC_WRITE: u32 = 1; |
154 | pub const _IOC_READ: u32 = 2; |
155 | pub const IOC_IN: u32 = 1073741824; |
156 | pub const IOC_OUT: u32 = 2147483648; |
157 | pub const IOC_INOUT: u32 = 3221225472; |
158 | pub const IOCSIZE_MASK: u32 = 1073676288; |
159 | pub const IOCSIZE_SHIFT: u32 = 16; |
160 | pub const __LITTLE_ENDIAN: u32 = 1234; |
161 | pub const PERF_PMU_TYPE_SHIFT: u32 = 32; |
162 | pub const PERF_HW_EVENT_MASK: u32 = 4294967295; |
163 | pub const PERF_ATTR_SIZE_VER0: u32 = 64; |
164 | pub const PERF_ATTR_SIZE_VER1: u32 = 72; |
165 | pub const PERF_ATTR_SIZE_VER2: u32 = 80; |
166 | pub const PERF_ATTR_SIZE_VER3: u32 = 96; |
167 | pub const PERF_ATTR_SIZE_VER4: u32 = 104; |
168 | pub const PERF_ATTR_SIZE_VER5: u32 = 112; |
169 | pub const PERF_ATTR_SIZE_VER6: u32 = 120; |
170 | pub const PERF_ATTR_SIZE_VER7: u32 = 128; |
171 | pub const PERF_RECORD_MISC_CPUMODE_MASK: u32 = 7; |
172 | pub const PERF_RECORD_MISC_CPUMODE_UNKNOWN: u32 = 0; |
173 | pub const PERF_RECORD_MISC_KERNEL: u32 = 1; |
174 | pub const PERF_RECORD_MISC_USER: u32 = 2; |
175 | pub const PERF_RECORD_MISC_HYPERVISOR: u32 = 3; |
176 | pub const PERF_RECORD_MISC_GUEST_KERNEL: u32 = 4; |
177 | pub const PERF_RECORD_MISC_GUEST_USER: u32 = 5; |
178 | pub const PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT: u32 = 4096; |
179 | pub const PERF_RECORD_MISC_MMAP_DATA: u32 = 8192; |
180 | pub const PERF_RECORD_MISC_COMM_EXEC: u32 = 8192; |
181 | pub const PERF_RECORD_MISC_FORK_EXEC: u32 = 8192; |
182 | pub const PERF_RECORD_MISC_SWITCH_OUT: u32 = 8192; |
183 | pub const PERF_RECORD_MISC_EXACT_IP: u32 = 16384; |
184 | pub const PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: u32 = 16384; |
185 | pub const PERF_RECORD_MISC_MMAP_BUILD_ID: u32 = 16384; |
186 | pub const PERF_RECORD_MISC_EXT_RESERVED: u32 = 32768; |
187 | pub const PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER: u32 = 1; |
188 | pub const PERF_MAX_STACK_DEPTH: u32 = 127; |
189 | pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; |
190 | pub const PERF_AUX_FLAG_TRUNCATED: u32 = 1; |
191 | pub const PERF_AUX_FLAG_OVERWRITE: u32 = 2; |
192 | pub const PERF_AUX_FLAG_PARTIAL: u32 = 4; |
193 | pub const PERF_AUX_FLAG_COLLISION: u32 = 8; |
194 | pub const PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK: u32 = 65280; |
195 | pub const PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT: u32 = 0; |
196 | pub const PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW: u32 = 256; |
197 | pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; |
198 | pub const PERF_FLAG_FD_OUTPUT: u32 = 2; |
199 | pub const PERF_FLAG_PID_CGROUP: u32 = 4; |
200 | pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; |
201 | pub const PERF_MEM_OP_NA: u32 = 1; |
202 | pub const PERF_MEM_OP_LOAD: u32 = 2; |
203 | pub const PERF_MEM_OP_STORE: u32 = 4; |
204 | pub const PERF_MEM_OP_PFETCH: u32 = 8; |
205 | pub const PERF_MEM_OP_EXEC: u32 = 16; |
206 | pub const PERF_MEM_OP_SHIFT: u32 = 0; |
207 | pub const PERF_MEM_LVL_NA: u32 = 1; |
208 | pub const PERF_MEM_LVL_HIT: u32 = 2; |
209 | pub const PERF_MEM_LVL_MISS: u32 = 4; |
210 | pub const PERF_MEM_LVL_L1: u32 = 8; |
211 | pub const PERF_MEM_LVL_LFB: u32 = 16; |
212 | pub const PERF_MEM_LVL_L2: u32 = 32; |
213 | pub const PERF_MEM_LVL_L3: u32 = 64; |
214 | pub const PERF_MEM_LVL_LOC_RAM: u32 = 128; |
215 | pub const PERF_MEM_LVL_REM_RAM1: u32 = 256; |
216 | pub const PERF_MEM_LVL_REM_RAM2: u32 = 512; |
217 | pub const PERF_MEM_LVL_REM_CCE1: u32 = 1024; |
218 | pub const PERF_MEM_LVL_REM_CCE2: u32 = 2048; |
219 | pub const PERF_MEM_LVL_IO: u32 = 4096; |
220 | pub const PERF_MEM_LVL_UNC: u32 = 8192; |
221 | pub const PERF_MEM_LVL_SHIFT: u32 = 5; |
222 | pub const PERF_MEM_REMOTE_REMOTE: u32 = 1; |
223 | pub const PERF_MEM_REMOTE_SHIFT: u32 = 37; |
224 | pub const PERF_MEM_LVLNUM_L1: u32 = 1; |
225 | pub const PERF_MEM_LVLNUM_L2: u32 = 2; |
226 | pub const PERF_MEM_LVLNUM_L3: u32 = 3; |
227 | pub const PERF_MEM_LVLNUM_L4: u32 = 4; |
228 | pub const PERF_MEM_LVLNUM_ANY_CACHE: u32 = 11; |
229 | pub const PERF_MEM_LVLNUM_LFB: u32 = 12; |
230 | pub const PERF_MEM_LVLNUM_RAM: u32 = 13; |
231 | pub const PERF_MEM_LVLNUM_PMEM: u32 = 14; |
232 | pub const PERF_MEM_LVLNUM_NA: u32 = 15; |
233 | pub const PERF_MEM_LVLNUM_SHIFT: u32 = 33; |
234 | pub const PERF_MEM_SNOOP_NA: u32 = 1; |
235 | pub const PERF_MEM_SNOOP_NONE: u32 = 2; |
236 | pub const PERF_MEM_SNOOP_HIT: u32 = 4; |
237 | pub const PERF_MEM_SNOOP_MISS: u32 = 8; |
238 | pub const PERF_MEM_SNOOP_HITM: u32 = 16; |
239 | pub const PERF_MEM_SNOOP_SHIFT: u32 = 19; |
240 | pub const PERF_MEM_SNOOPX_FWD: u32 = 1; |
241 | pub const PERF_MEM_SNOOPX_SHIFT: u32 = 38; |
242 | pub const PERF_MEM_LOCK_NA: u32 = 1; |
243 | pub const PERF_MEM_LOCK_LOCKED: u32 = 2; |
244 | pub const PERF_MEM_LOCK_SHIFT: u32 = 24; |
245 | pub const PERF_MEM_TLB_NA: u32 = 1; |
246 | pub const PERF_MEM_TLB_HIT: u32 = 2; |
247 | pub const PERF_MEM_TLB_MISS: u32 = 4; |
248 | pub const PERF_MEM_TLB_L1: u32 = 8; |
249 | pub const PERF_MEM_TLB_L2: u32 = 16; |
250 | pub const PERF_MEM_TLB_WK: u32 = 32; |
251 | pub const PERF_MEM_TLB_OS: u32 = 64; |
252 | pub const PERF_MEM_TLB_SHIFT: u32 = 26; |
253 | pub const PERF_MEM_BLK_NA: u32 = 1; |
254 | pub const PERF_MEM_BLK_DATA: u32 = 2; |
255 | pub const PERF_MEM_BLK_ADDR: u32 = 4; |
256 | pub const PERF_MEM_BLK_SHIFT: u32 = 40; |
257 | pub const PERF_MEM_HOPS_0: u32 = 1; |
258 | pub const PERF_MEM_HOPS_1: u32 = 2; |
259 | pub const PERF_MEM_HOPS_2: u32 = 3; |
260 | pub const PERF_MEM_HOPS_3: u32 = 4; |
261 | pub const PERF_MEM_HOPS_SHIFT: u32 = 43; |
262 | pub const __X32_SYSCALL_BIT: u32 = 1073741824; |
263 | pub const __NR_read: u32 = 0; |
264 | pub const __NR_write: u32 = 1; |
265 | pub const __NR_open: u32 = 2; |
266 | pub const __NR_close: u32 = 3; |
267 | pub const __NR_stat: u32 = 4; |
268 | pub const __NR_fstat: u32 = 5; |
269 | pub const __NR_lstat: u32 = 6; |
270 | pub const __NR_poll: u32 = 7; |
271 | pub const __NR_lseek: u32 = 8; |
272 | pub const __NR_mmap: u32 = 9; |
273 | pub const __NR_mprotect: u32 = 10; |
274 | pub const __NR_munmap: u32 = 11; |
275 | pub const __NR_brk: u32 = 12; |
276 | pub const __NR_rt_sigaction: u32 = 13; |
277 | pub const __NR_rt_sigprocmask: u32 = 14; |
278 | pub const __NR_rt_sigreturn: u32 = 15; |
279 | pub const __NR_ioctl: u32 = 16; |
280 | pub const __NR_pread64: u32 = 17; |
281 | pub const __NR_pwrite64: u32 = 18; |
282 | pub const __NR_readv: u32 = 19; |
283 | pub const __NR_writev: u32 = 20; |
284 | pub const __NR_access: u32 = 21; |
285 | pub const __NR_pipe: u32 = 22; |
286 | pub const __NR_select: u32 = 23; |
287 | pub const __NR_sched_yield: u32 = 24; |
288 | pub const __NR_mremap: u32 = 25; |
289 | pub const __NR_msync: u32 = 26; |
290 | pub const __NR_mincore: u32 = 27; |
291 | pub const __NR_madvise: u32 = 28; |
292 | pub const __NR_shmget: u32 = 29; |
293 | pub const __NR_shmat: u32 = 30; |
294 | pub const __NR_shmctl: u32 = 31; |
295 | pub const __NR_dup: u32 = 32; |
296 | pub const __NR_dup2: u32 = 33; |
297 | pub const __NR_pause: u32 = 34; |
298 | pub const __NR_nanosleep: u32 = 35; |
299 | pub const __NR_getitimer: u32 = 36; |
300 | pub const __NR_alarm: u32 = 37; |
301 | pub const __NR_setitimer: u32 = 38; |
302 | pub const __NR_getpid: u32 = 39; |
303 | pub const __NR_sendfile: u32 = 40; |
304 | pub const __NR_socket: u32 = 41; |
305 | pub const __NR_connect: u32 = 42; |
306 | pub const __NR_accept: u32 = 43; |
307 | pub const __NR_sendto: u32 = 44; |
308 | pub const __NR_recvfrom: u32 = 45; |
309 | pub const __NR_sendmsg: u32 = 46; |
310 | pub const __NR_recvmsg: u32 = 47; |
311 | pub const __NR_shutdown: u32 = 48; |
312 | pub const __NR_bind: u32 = 49; |
313 | pub const __NR_listen: u32 = 50; |
314 | pub const __NR_getsockname: u32 = 51; |
315 | pub const __NR_getpeername: u32 = 52; |
316 | pub const __NR_socketpair: u32 = 53; |
317 | pub const __NR_setsockopt: u32 = 54; |
318 | pub const __NR_getsockopt: u32 = 55; |
319 | pub const __NR_clone: u32 = 56; |
320 | pub const __NR_fork: u32 = 57; |
321 | pub const __NR_vfork: u32 = 58; |
322 | pub const __NR_execve: u32 = 59; |
323 | pub const __NR_exit: u32 = 60; |
324 | pub const __NR_wait4: u32 = 61; |
325 | pub const __NR_kill: u32 = 62; |
326 | pub const __NR_uname: u32 = 63; |
327 | pub const __NR_semget: u32 = 64; |
328 | pub const __NR_semop: u32 = 65; |
329 | pub const __NR_semctl: u32 = 66; |
330 | pub const __NR_shmdt: u32 = 67; |
331 | pub const __NR_msgget: u32 = 68; |
332 | pub const __NR_msgsnd: u32 = 69; |
333 | pub const __NR_msgrcv: u32 = 70; |
334 | pub const __NR_msgctl: u32 = 71; |
335 | pub const __NR_fcntl: u32 = 72; |
336 | pub const __NR_flock: u32 = 73; |
337 | pub const __NR_fsync: u32 = 74; |
338 | pub const __NR_fdatasync: u32 = 75; |
339 | pub const __NR_truncate: u32 = 76; |
340 | pub const __NR_ftruncate: u32 = 77; |
341 | pub const __NR_getdents: u32 = 78; |
342 | pub const __NR_getcwd: u32 = 79; |
343 | pub const __NR_chdir: u32 = 80; |
344 | pub const __NR_fchdir: u32 = 81; |
345 | pub const __NR_rename: u32 = 82; |
346 | pub const __NR_mkdir: u32 = 83; |
347 | pub const __NR_rmdir: u32 = 84; |
348 | pub const __NR_creat: u32 = 85; |
349 | pub const __NR_link: u32 = 86; |
350 | pub const __NR_unlink: u32 = 87; |
351 | pub const __NR_symlink: u32 = 88; |
352 | pub const __NR_readlink: u32 = 89; |
353 | pub const __NR_chmod: u32 = 90; |
354 | pub const __NR_fchmod: u32 = 91; |
355 | pub const __NR_chown: u32 = 92; |
356 | pub const __NR_fchown: u32 = 93; |
357 | pub const __NR_lchown: u32 = 94; |
358 | pub const __NR_umask: u32 = 95; |
359 | pub const __NR_gettimeofday: u32 = 96; |
360 | pub const __NR_getrlimit: u32 = 97; |
361 | pub const __NR_getrusage: u32 = 98; |
362 | pub const __NR_sysinfo: u32 = 99; |
363 | pub const __NR_times: u32 = 100; |
364 | pub const __NR_ptrace: u32 = 101; |
365 | pub const __NR_getuid: u32 = 102; |
366 | pub const __NR_syslog: u32 = 103; |
367 | pub const __NR_getgid: u32 = 104; |
368 | pub const __NR_setuid: u32 = 105; |
369 | pub const __NR_setgid: u32 = 106; |
370 | pub const __NR_geteuid: u32 = 107; |
371 | pub const __NR_getegid: u32 = 108; |
372 | pub const __NR_setpgid: u32 = 109; |
373 | pub const __NR_getppid: u32 = 110; |
374 | pub const __NR_getpgrp: u32 = 111; |
375 | pub const __NR_setsid: u32 = 112; |
376 | pub const __NR_setreuid: u32 = 113; |
377 | pub const __NR_setregid: u32 = 114; |
378 | pub const __NR_getgroups: u32 = 115; |
379 | pub const __NR_setgroups: u32 = 116; |
380 | pub const __NR_setresuid: u32 = 117; |
381 | pub const __NR_getresuid: u32 = 118; |
382 | pub const __NR_setresgid: u32 = 119; |
383 | pub const __NR_getresgid: u32 = 120; |
384 | pub const __NR_getpgid: u32 = 121; |
385 | pub const __NR_setfsuid: u32 = 122; |
386 | pub const __NR_setfsgid: u32 = 123; |
387 | pub const __NR_getsid: u32 = 124; |
388 | pub const __NR_capget: u32 = 125; |
389 | pub const __NR_capset: u32 = 126; |
390 | pub const __NR_rt_sigpending: u32 = 127; |
391 | pub const __NR_rt_sigtimedwait: u32 = 128; |
392 | pub const __NR_rt_sigqueueinfo: u32 = 129; |
393 | pub const __NR_rt_sigsuspend: u32 = 130; |
394 | pub const __NR_sigaltstack: u32 = 131; |
395 | pub const __NR_utime: u32 = 132; |
396 | pub const __NR_mknod: u32 = 133; |
397 | pub const __NR_uselib: u32 = 134; |
398 | pub const __NR_personality: u32 = 135; |
399 | pub const __NR_ustat: u32 = 136; |
400 | pub const __NR_statfs: u32 = 137; |
401 | pub const __NR_fstatfs: u32 = 138; |
402 | pub const __NR_sysfs: u32 = 139; |
403 | pub const __NR_getpriority: u32 = 140; |
404 | pub const __NR_setpriority: u32 = 141; |
405 | pub const __NR_sched_setparam: u32 = 142; |
406 | pub const __NR_sched_getparam: u32 = 143; |
407 | pub const __NR_sched_setscheduler: u32 = 144; |
408 | pub const __NR_sched_getscheduler: u32 = 145; |
409 | pub const __NR_sched_get_priority_max: u32 = 146; |
410 | pub const __NR_sched_get_priority_min: u32 = 147; |
411 | pub const __NR_sched_rr_get_interval: u32 = 148; |
412 | pub const __NR_mlock: u32 = 149; |
413 | pub const __NR_munlock: u32 = 150; |
414 | pub const __NR_mlockall: u32 = 151; |
415 | pub const __NR_munlockall: u32 = 152; |
416 | pub const __NR_vhangup: u32 = 153; |
417 | pub const __NR_modify_ldt: u32 = 154; |
418 | pub const __NR_pivot_root: u32 = 155; |
419 | pub const __NR__sysctl: u32 = 156; |
420 | pub const __NR_prctl: u32 = 157; |
421 | pub const __NR_arch_prctl: u32 = 158; |
422 | pub const __NR_adjtimex: u32 = 159; |
423 | pub const __NR_setrlimit: u32 = 160; |
424 | pub const __NR_chroot: u32 = 161; |
425 | pub const __NR_sync: u32 = 162; |
426 | pub const __NR_acct: u32 = 163; |
427 | pub const __NR_settimeofday: u32 = 164; |
428 | pub const __NR_mount: u32 = 165; |
429 | pub const __NR_umount2: u32 = 166; |
430 | pub const __NR_swapon: u32 = 167; |
431 | pub const __NR_swapoff: u32 = 168; |
432 | pub const __NR_reboot: u32 = 169; |
433 | pub const __NR_sethostname: u32 = 170; |
434 | pub const __NR_setdomainname: u32 = 171; |
435 | pub const __NR_iopl: u32 = 172; |
436 | pub const __NR_ioperm: u32 = 173; |
437 | pub const __NR_create_module: u32 = 174; |
438 | pub const __NR_init_module: u32 = 175; |
439 | pub const __NR_delete_module: u32 = 176; |
440 | pub const __NR_get_kernel_syms: u32 = 177; |
441 | pub const __NR_query_module: u32 = 178; |
442 | pub const __NR_quotactl: u32 = 179; |
443 | pub const __NR_nfsservctl: u32 = 180; |
444 | pub const __NR_getpmsg: u32 = 181; |
445 | pub const __NR_putpmsg: u32 = 182; |
446 | pub const __NR_afs_syscall: u32 = 183; |
447 | pub const __NR_tuxcall: u32 = 184; |
448 | pub const __NR_security: u32 = 185; |
449 | pub const __NR_gettid: u32 = 186; |
450 | pub const __NR_readahead: u32 = 187; |
451 | pub const __NR_setxattr: u32 = 188; |
452 | pub const __NR_lsetxattr: u32 = 189; |
453 | pub const __NR_fsetxattr: u32 = 190; |
454 | pub const __NR_getxattr: u32 = 191; |
455 | pub const __NR_lgetxattr: u32 = 192; |
456 | pub const __NR_fgetxattr: u32 = 193; |
457 | pub const __NR_listxattr: u32 = 194; |
458 | pub const __NR_llistxattr: u32 = 195; |
459 | pub const __NR_flistxattr: u32 = 196; |
460 | pub const __NR_removexattr: u32 = 197; |
461 | pub const __NR_lremovexattr: u32 = 198; |
462 | pub const __NR_fremovexattr: u32 = 199; |
463 | pub const __NR_tkill: u32 = 200; |
464 | pub const __NR_time: u32 = 201; |
465 | pub const __NR_futex: u32 = 202; |
466 | pub const __NR_sched_setaffinity: u32 = 203; |
467 | pub const __NR_sched_getaffinity: u32 = 204; |
468 | pub const __NR_set_thread_area: u32 = 205; |
469 | pub const __NR_io_setup: u32 = 206; |
470 | pub const __NR_io_destroy: u32 = 207; |
471 | pub const __NR_io_getevents: u32 = 208; |
472 | pub const __NR_io_submit: u32 = 209; |
473 | pub const __NR_io_cancel: u32 = 210; |
474 | pub const __NR_get_thread_area: u32 = 211; |
475 | pub const __NR_lookup_dcookie: u32 = 212; |
476 | pub const __NR_epoll_create: u32 = 213; |
477 | pub const __NR_epoll_ctl_old: u32 = 214; |
478 | pub const __NR_epoll_wait_old: u32 = 215; |
479 | pub const __NR_remap_file_pages: u32 = 216; |
480 | pub const __NR_getdents64: u32 = 217; |
481 | pub const __NR_set_tid_address: u32 = 218; |
482 | pub const __NR_restart_syscall: u32 = 219; |
483 | pub const __NR_semtimedop: u32 = 220; |
484 | pub const __NR_fadvise64: u32 = 221; |
485 | pub const __NR_timer_create: u32 = 222; |
486 | pub const __NR_timer_settime: u32 = 223; |
487 | pub const __NR_timer_gettime: u32 = 224; |
488 | pub const __NR_timer_getoverrun: u32 = 225; |
489 | pub const __NR_timer_delete: u32 = 226; |
490 | pub const __NR_clock_settime: u32 = 227; |
491 | pub const __NR_clock_gettime: u32 = 228; |
492 | pub const __NR_clock_getres: u32 = 229; |
493 | pub const __NR_clock_nanosleep: u32 = 230; |
494 | pub const __NR_exit_group: u32 = 231; |
495 | pub const __NR_epoll_wait: u32 = 232; |
496 | pub const __NR_epoll_ctl: u32 = 233; |
497 | pub const __NR_tgkill: u32 = 234; |
498 | pub const __NR_utimes: u32 = 235; |
499 | pub const __NR_vserver: u32 = 236; |
500 | pub const __NR_mbind: u32 = 237; |
501 | pub const __NR_set_mempolicy: u32 = 238; |
502 | pub const __NR_get_mempolicy: u32 = 239; |
503 | pub const __NR_mq_open: u32 = 240; |
504 | pub const __NR_mq_unlink: u32 = 241; |
505 | pub const __NR_mq_timedsend: u32 = 242; |
506 | pub const __NR_mq_timedreceive: u32 = 243; |
507 | pub const __NR_mq_notify: u32 = 244; |
508 | pub const __NR_mq_getsetattr: u32 = 245; |
509 | pub const __NR_kexec_load: u32 = 246; |
510 | pub const __NR_waitid: u32 = 247; |
511 | pub const __NR_add_key: u32 = 248; |
512 | pub const __NR_request_key: u32 = 249; |
513 | pub const __NR_keyctl: u32 = 250; |
514 | pub const __NR_ioprio_set: u32 = 251; |
515 | pub const __NR_ioprio_get: u32 = 252; |
516 | pub const __NR_inotify_init: u32 = 253; |
517 | pub const __NR_inotify_add_watch: u32 = 254; |
518 | pub const __NR_inotify_rm_watch: u32 = 255; |
519 | pub const __NR_migrate_pages: u32 = 256; |
520 | pub const __NR_openat: u32 = 257; |
521 | pub const __NR_mkdirat: u32 = 258; |
522 | pub const __NR_mknodat: u32 = 259; |
523 | pub const __NR_fchownat: u32 = 260; |
524 | pub const __NR_futimesat: u32 = 261; |
525 | pub const __NR_newfstatat: u32 = 262; |
526 | pub const __NR_unlinkat: u32 = 263; |
527 | pub const __NR_renameat: u32 = 264; |
528 | pub const __NR_linkat: u32 = 265; |
529 | pub const __NR_symlinkat: u32 = 266; |
530 | pub const __NR_readlinkat: u32 = 267; |
531 | pub const __NR_fchmodat: u32 = 268; |
532 | pub const __NR_faccessat: u32 = 269; |
533 | pub const __NR_pselect6: u32 = 270; |
534 | pub const __NR_ppoll: u32 = 271; |
535 | pub const __NR_unshare: u32 = 272; |
536 | pub const __NR_set_robust_list: u32 = 273; |
537 | pub const __NR_get_robust_list: u32 = 274; |
538 | pub const __NR_splice: u32 = 275; |
539 | pub const __NR_tee: u32 = 276; |
540 | pub const __NR_sync_file_range: u32 = 277; |
541 | pub const __NR_vmsplice: u32 = 278; |
542 | pub const __NR_move_pages: u32 = 279; |
543 | pub const __NR_utimensat: u32 = 280; |
544 | pub const __NR_epoll_pwait: u32 = 281; |
545 | pub const __NR_signalfd: u32 = 282; |
546 | pub const __NR_timerfd_create: u32 = 283; |
547 | pub const __NR_eventfd: u32 = 284; |
548 | pub const __NR_fallocate: u32 = 285; |
549 | pub const __NR_timerfd_settime: u32 = 286; |
550 | pub const __NR_timerfd_gettime: u32 = 287; |
551 | pub const __NR_accept4: u32 = 288; |
552 | pub const __NR_signalfd4: u32 = 289; |
553 | pub const __NR_eventfd2: u32 = 290; |
554 | pub const __NR_epoll_create1: u32 = 291; |
555 | pub const __NR_dup3: u32 = 292; |
556 | pub const __NR_pipe2: u32 = 293; |
557 | pub const __NR_inotify_init1: u32 = 294; |
558 | pub const __NR_preadv: u32 = 295; |
559 | pub const __NR_pwritev: u32 = 296; |
560 | pub const __NR_rt_tgsigqueueinfo: u32 = 297; |
561 | pub const __NR_perf_event_open: u32 = 298; |
562 | pub const __NR_recvmmsg: u32 = 299; |
563 | pub const __NR_fanotify_init: u32 = 300; |
564 | pub const __NR_fanotify_mark: u32 = 301; |
565 | pub const __NR_prlimit64: u32 = 302; |
566 | pub const __NR_name_to_handle_at: u32 = 303; |
567 | pub const __NR_open_by_handle_at: u32 = 304; |
568 | pub const __NR_clock_adjtime: u32 = 305; |
569 | pub const __NR_syncfs: u32 = 306; |
570 | pub const __NR_sendmmsg: u32 = 307; |
571 | pub const __NR_setns: u32 = 308; |
572 | pub const __NR_getcpu: u32 = 309; |
573 | pub const __NR_process_vm_readv: u32 = 310; |
574 | pub const __NR_process_vm_writev: u32 = 311; |
575 | pub const __NR_kcmp: u32 = 312; |
576 | pub const __NR_finit_module: u32 = 313; |
577 | pub const __NR_sched_setattr: u32 = 314; |
578 | pub const __NR_sched_getattr: u32 = 315; |
579 | pub const __NR_renameat2: u32 = 316; |
580 | pub const __NR_seccomp: u32 = 317; |
581 | pub const __NR_getrandom: u32 = 318; |
582 | pub const __NR_memfd_create: u32 = 319; |
583 | pub const __NR_kexec_file_load: u32 = 320; |
584 | pub const __NR_bpf: u32 = 321; |
585 | pub const __NR_execveat: u32 = 322; |
586 | pub const __NR_userfaultfd: u32 = 323; |
587 | pub const __NR_membarrier: u32 = 324; |
588 | pub const __NR_mlock2: u32 = 325; |
589 | pub const __NR_copy_file_range: u32 = 326; |
590 | pub const __NR_preadv2: u32 = 327; |
591 | pub const __NR_pwritev2: u32 = 328; |
592 | pub const __NR_pkey_mprotect: u32 = 329; |
593 | pub const __NR_pkey_alloc: u32 = 330; |
594 | pub const __NR_pkey_free: u32 = 331; |
595 | pub const __NR_statx: u32 = 332; |
596 | pub const __NR_io_pgetevents: u32 = 333; |
597 | pub const __NR_rseq: u32 = 334; |
598 | pub const __NR_pidfd_send_signal: u32 = 424; |
599 | pub const __NR_io_uring_setup: u32 = 425; |
600 | pub const __NR_io_uring_enter: u32 = 426; |
601 | pub const __NR_io_uring_register: u32 = 427; |
602 | pub const __NR_open_tree: u32 = 428; |
603 | pub const __NR_move_mount: u32 = 429; |
604 | pub const __NR_fsopen: u32 = 430; |
605 | pub const __NR_fsconfig: u32 = 431; |
606 | pub const __NR_fsmount: u32 = 432; |
607 | pub const __NR_fspick: u32 = 433; |
608 | pub const __NR_pidfd_open: u32 = 434; |
609 | pub const __NR_clone3: u32 = 435; |
610 | pub const __NR_close_range: u32 = 436; |
611 | pub const __NR_openat2: u32 = 437; |
612 | pub const __NR_pidfd_getfd: u32 = 438; |
613 | pub const __NR_faccessat2: u32 = 439; |
614 | pub const __NR_process_madvise: u32 = 440; |
615 | pub const __NR_epoll_pwait2: u32 = 441; |
616 | pub const __NR_mount_setattr: u32 = 442; |
617 | pub const __NR_quotactl_fd: u32 = 443; |
618 | pub const __NR_landlock_create_ruleset: u32 = 444; |
619 | pub const __NR_landlock_add_rule: u32 = 445; |
620 | pub const __NR_landlock_restrict_self: u32 = 446; |
621 | pub const __NR_memfd_secret: u32 = 447; |
622 | pub const __NR_process_mrelease: u32 = 448; |
623 | pub const __NR_futex_waitv: u32 = 449; |
624 | pub const __NR_set_mempolicy_home_node: u32 = 450; |
625 | pub type __s8 = ::std::os::raw::c_schar; |
626 | pub type __u8 = ::std::os::raw::c_uchar; |
627 | pub type __s16 = ::std::os::raw::c_short; |
628 | pub type __u16 = ::std::os::raw::c_ushort; |
629 | pub type __s32 = ::std::os::raw::c_int; |
630 | pub type __u32 = ::std::os::raw::c_uint; |
631 | pub type __s64 = ::std::os::raw::c_longlong; |
632 | pub type __u64 = ::std::os::raw::c_ulonglong; |
633 | #[repr (C)] |
634 | #[derive (Debug, Default, Copy, Clone)] |
635 | pub struct __kernel_fd_set { |
636 | pub fds_bits: [::std::os::raw::c_ulong; 16usize], |
637 | } |
638 | #[test ] |
639 | fn bindgen_test_layout___kernel_fd_set() { |
640 | assert_eq!( |
641 | ::std::mem::size_of::<__kernel_fd_set>(), |
642 | 128usize, |
643 | concat!("Size of: " , stringify!(__kernel_fd_set)) |
644 | ); |
645 | assert_eq!( |
646 | ::std::mem::align_of::<__kernel_fd_set>(), |
647 | 8usize, |
648 | concat!("Alignment of " , stringify!(__kernel_fd_set)) |
649 | ); |
650 | assert_eq!( |
651 | unsafe { &(*(::std::ptr::null::<__kernel_fd_set>())).fds_bits as *const _ as usize }, |
652 | 0usize, |
653 | concat!( |
654 | "Offset of field: " , |
655 | stringify!(__kernel_fd_set), |
656 | "::" , |
657 | stringify!(fds_bits) |
658 | ) |
659 | ); |
660 | } |
661 | pub type __kernel_sighandler_t = |
662 | ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>; |
663 | pub type __kernel_key_t = ::std::os::raw::c_int; |
664 | pub type __kernel_mqd_t = ::std::os::raw::c_int; |
665 | pub type __kernel_old_uid_t = ::std::os::raw::c_ushort; |
666 | pub type __kernel_old_gid_t = ::std::os::raw::c_ushort; |
667 | pub type __kernel_old_dev_t = ::std::os::raw::c_ulong; |
668 | pub type __kernel_long_t = ::std::os::raw::c_long; |
669 | pub type __kernel_ulong_t = ::std::os::raw::c_ulong; |
670 | pub type __kernel_ino_t = __kernel_ulong_t; |
671 | pub type __kernel_mode_t = ::std::os::raw::c_uint; |
672 | pub type __kernel_pid_t = ::std::os::raw::c_int; |
673 | pub type __kernel_ipc_pid_t = ::std::os::raw::c_int; |
674 | pub type __kernel_uid_t = ::std::os::raw::c_uint; |
675 | pub type __kernel_gid_t = ::std::os::raw::c_uint; |
676 | pub type __kernel_suseconds_t = __kernel_long_t; |
677 | pub type __kernel_daddr_t = ::std::os::raw::c_int; |
678 | pub type __kernel_uid32_t = ::std::os::raw::c_uint; |
679 | pub type __kernel_gid32_t = ::std::os::raw::c_uint; |
680 | pub type __kernel_size_t = __kernel_ulong_t; |
681 | pub type __kernel_ssize_t = __kernel_long_t; |
682 | pub type __kernel_ptrdiff_t = __kernel_long_t; |
683 | #[repr (C)] |
684 | #[derive (Debug, Default, Copy, Clone)] |
685 | pub struct __kernel_fsid_t { |
686 | pub val: [::std::os::raw::c_int; 2usize], |
687 | } |
688 | #[test ] |
689 | fn bindgen_test_layout___kernel_fsid_t() { |
690 | assert_eq!( |
691 | ::std::mem::size_of::<__kernel_fsid_t>(), |
692 | 8usize, |
693 | concat!("Size of: " , stringify!(__kernel_fsid_t)) |
694 | ); |
695 | assert_eq!( |
696 | ::std::mem::align_of::<__kernel_fsid_t>(), |
697 | 4usize, |
698 | concat!("Alignment of " , stringify!(__kernel_fsid_t)) |
699 | ); |
700 | assert_eq!( |
701 | unsafe { &(*(::std::ptr::null::<__kernel_fsid_t>())).val as *const _ as usize }, |
702 | 0usize, |
703 | concat!( |
704 | "Offset of field: " , |
705 | stringify!(__kernel_fsid_t), |
706 | "::" , |
707 | stringify!(val) |
708 | ) |
709 | ); |
710 | } |
711 | pub type __kernel_off_t = __kernel_long_t; |
712 | pub type __kernel_loff_t = ::std::os::raw::c_longlong; |
713 | pub type __kernel_old_time_t = __kernel_long_t; |
714 | pub type __kernel_time_t = __kernel_long_t; |
715 | pub type __kernel_time64_t = ::std::os::raw::c_longlong; |
716 | pub type __kernel_clock_t = __kernel_long_t; |
717 | pub type __kernel_timer_t = ::std::os::raw::c_int; |
718 | pub type __kernel_clockid_t = ::std::os::raw::c_int; |
719 | pub type __kernel_caddr_t = *mut ::std::os::raw::c_char; |
720 | pub type __kernel_uid16_t = ::std::os::raw::c_ushort; |
721 | pub type __kernel_gid16_t = ::std::os::raw::c_ushort; |
722 | pub type __le16 = __u16; |
723 | pub type __be16 = __u16; |
724 | pub type __le32 = __u32; |
725 | pub type __be32 = __u32; |
726 | pub type __le64 = __u64; |
727 | pub type __be64 = __u64; |
728 | pub type __sum16 = __u16; |
729 | pub type __wsum = __u32; |
730 | pub type __poll_t = ::std::os::raw::c_uint; |
731 | pub const PERF_TYPE_HARDWARE: perf_type_id = 0; |
732 | pub const PERF_TYPE_SOFTWARE: perf_type_id = 1; |
733 | pub const PERF_TYPE_TRACEPOINT: perf_type_id = 2; |
734 | pub const PERF_TYPE_HW_CACHE: perf_type_id = 3; |
735 | pub const PERF_TYPE_RAW: perf_type_id = 4; |
736 | pub const PERF_TYPE_BREAKPOINT: perf_type_id = 5; |
737 | pub const PERF_TYPE_MAX: perf_type_id = 6; |
738 | pub type perf_type_id = ::std::os::raw::c_uint; |
739 | pub const PERF_COUNT_HW_CPU_CYCLES: perf_hw_id = 0; |
740 | pub const PERF_COUNT_HW_INSTRUCTIONS: perf_hw_id = 1; |
741 | pub const PERF_COUNT_HW_CACHE_REFERENCES: perf_hw_id = 2; |
742 | pub const PERF_COUNT_HW_CACHE_MISSES: perf_hw_id = 3; |
743 | pub const PERF_COUNT_HW_BRANCH_INSTRUCTIONS: perf_hw_id = 4; |
744 | pub const PERF_COUNT_HW_BRANCH_MISSES: perf_hw_id = 5; |
745 | pub const PERF_COUNT_HW_BUS_CYCLES: perf_hw_id = 6; |
746 | pub const PERF_COUNT_HW_STALLED_CYCLES_FRONTEND: perf_hw_id = 7; |
747 | pub const PERF_COUNT_HW_STALLED_CYCLES_BACKEND: perf_hw_id = 8; |
748 | pub const PERF_COUNT_HW_REF_CPU_CYCLES: perf_hw_id = 9; |
749 | pub const PERF_COUNT_HW_MAX: perf_hw_id = 10; |
750 | pub type perf_hw_id = ::std::os::raw::c_uint; |
751 | pub const PERF_COUNT_HW_CACHE_L1D: perf_hw_cache_id = 0; |
752 | pub const PERF_COUNT_HW_CACHE_L1I: perf_hw_cache_id = 1; |
753 | pub const PERF_COUNT_HW_CACHE_LL: perf_hw_cache_id = 2; |
754 | pub const PERF_COUNT_HW_CACHE_DTLB: perf_hw_cache_id = 3; |
755 | pub const PERF_COUNT_HW_CACHE_ITLB: perf_hw_cache_id = 4; |
756 | pub const PERF_COUNT_HW_CACHE_BPU: perf_hw_cache_id = 5; |
757 | pub const PERF_COUNT_HW_CACHE_NODE: perf_hw_cache_id = 6; |
758 | pub const PERF_COUNT_HW_CACHE_MAX: perf_hw_cache_id = 7; |
759 | pub type perf_hw_cache_id = ::std::os::raw::c_uint; |
760 | pub const PERF_COUNT_HW_CACHE_OP_READ: perf_hw_cache_op_id = 0; |
761 | pub const PERF_COUNT_HW_CACHE_OP_WRITE: perf_hw_cache_op_id = 1; |
762 | pub const PERF_COUNT_HW_CACHE_OP_PREFETCH: perf_hw_cache_op_id = 2; |
763 | pub const PERF_COUNT_HW_CACHE_OP_MAX: perf_hw_cache_op_id = 3; |
764 | pub type perf_hw_cache_op_id = ::std::os::raw::c_uint; |
765 | pub const PERF_COUNT_HW_CACHE_RESULT_ACCESS: perf_hw_cache_op_result_id = 0; |
766 | pub const PERF_COUNT_HW_CACHE_RESULT_MISS: perf_hw_cache_op_result_id = 1; |
767 | pub const PERF_COUNT_HW_CACHE_RESULT_MAX: perf_hw_cache_op_result_id = 2; |
768 | pub type perf_hw_cache_op_result_id = ::std::os::raw::c_uint; |
769 | pub const PERF_COUNT_SW_CPU_CLOCK: perf_sw_ids = 0; |
770 | pub const PERF_COUNT_SW_TASK_CLOCK: perf_sw_ids = 1; |
771 | pub const PERF_COUNT_SW_PAGE_FAULTS: perf_sw_ids = 2; |
772 | pub const PERF_COUNT_SW_CONTEXT_SWITCHES: perf_sw_ids = 3; |
773 | pub const PERF_COUNT_SW_CPU_MIGRATIONS: perf_sw_ids = 4; |
774 | pub const PERF_COUNT_SW_PAGE_FAULTS_MIN: perf_sw_ids = 5; |
775 | pub const PERF_COUNT_SW_PAGE_FAULTS_MAJ: perf_sw_ids = 6; |
776 | pub const PERF_COUNT_SW_ALIGNMENT_FAULTS: perf_sw_ids = 7; |
777 | pub const PERF_COUNT_SW_EMULATION_FAULTS: perf_sw_ids = 8; |
778 | pub const PERF_COUNT_SW_DUMMY: perf_sw_ids = 9; |
779 | pub const PERF_COUNT_SW_BPF_OUTPUT: perf_sw_ids = 10; |
780 | pub const PERF_COUNT_SW_CGROUP_SWITCHES: perf_sw_ids = 11; |
781 | pub const PERF_COUNT_SW_MAX: perf_sw_ids = 12; |
782 | pub type perf_sw_ids = ::std::os::raw::c_uint; |
783 | pub const PERF_SAMPLE_IP: perf_event_sample_format = 1; |
784 | pub const PERF_SAMPLE_TID: perf_event_sample_format = 2; |
785 | pub const PERF_SAMPLE_TIME: perf_event_sample_format = 4; |
786 | pub const PERF_SAMPLE_ADDR: perf_event_sample_format = 8; |
787 | pub const PERF_SAMPLE_READ: perf_event_sample_format = 16; |
788 | pub const PERF_SAMPLE_CALLCHAIN: perf_event_sample_format = 32; |
789 | pub const PERF_SAMPLE_ID: perf_event_sample_format = 64; |
790 | pub const PERF_SAMPLE_CPU: perf_event_sample_format = 128; |
791 | pub const PERF_SAMPLE_PERIOD: perf_event_sample_format = 256; |
792 | pub const PERF_SAMPLE_STREAM_ID: perf_event_sample_format = 512; |
793 | pub const PERF_SAMPLE_RAW: perf_event_sample_format = 1024; |
794 | pub const PERF_SAMPLE_BRANCH_STACK: perf_event_sample_format = 2048; |
795 | pub const PERF_SAMPLE_REGS_USER: perf_event_sample_format = 4096; |
796 | pub const PERF_SAMPLE_STACK_USER: perf_event_sample_format = 8192; |
797 | pub const PERF_SAMPLE_WEIGHT: perf_event_sample_format = 16384; |
798 | pub const PERF_SAMPLE_DATA_SRC: perf_event_sample_format = 32768; |
799 | pub const PERF_SAMPLE_IDENTIFIER: perf_event_sample_format = 65536; |
800 | pub const PERF_SAMPLE_TRANSACTION: perf_event_sample_format = 131072; |
801 | pub const PERF_SAMPLE_REGS_INTR: perf_event_sample_format = 262144; |
802 | pub const PERF_SAMPLE_PHYS_ADDR: perf_event_sample_format = 524288; |
803 | pub const PERF_SAMPLE_AUX: perf_event_sample_format = 1048576; |
804 | pub const PERF_SAMPLE_CGROUP: perf_event_sample_format = 2097152; |
805 | pub const PERF_SAMPLE_DATA_PAGE_SIZE: perf_event_sample_format = 4194304; |
806 | pub const PERF_SAMPLE_CODE_PAGE_SIZE: perf_event_sample_format = 8388608; |
807 | pub const PERF_SAMPLE_WEIGHT_STRUCT: perf_event_sample_format = 16777216; |
808 | pub const PERF_SAMPLE_MAX: perf_event_sample_format = 33554432; |
809 | pub const __PERF_SAMPLE_CALLCHAIN_EARLY: perf_event_sample_format = 9223372036854775808; |
810 | pub type perf_event_sample_format = ::std::os::raw::c_ulong; |
811 | pub const PERF_SAMPLE_BRANCH_USER_SHIFT: perf_branch_sample_type_shift = 0; |
812 | pub const PERF_SAMPLE_BRANCH_KERNEL_SHIFT: perf_branch_sample_type_shift = 1; |
813 | pub const PERF_SAMPLE_BRANCH_HV_SHIFT: perf_branch_sample_type_shift = 2; |
814 | pub const PERF_SAMPLE_BRANCH_ANY_SHIFT: perf_branch_sample_type_shift = 3; |
815 | pub const PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT: perf_branch_sample_type_shift = 4; |
816 | pub const PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT: perf_branch_sample_type_shift = 5; |
817 | pub const PERF_SAMPLE_BRANCH_IND_CALL_SHIFT: perf_branch_sample_type_shift = 6; |
818 | pub const PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT: perf_branch_sample_type_shift = 7; |
819 | pub const PERF_SAMPLE_BRANCH_IN_TX_SHIFT: perf_branch_sample_type_shift = 8; |
820 | pub const PERF_SAMPLE_BRANCH_NO_TX_SHIFT: perf_branch_sample_type_shift = 9; |
821 | pub const PERF_SAMPLE_BRANCH_COND_SHIFT: perf_branch_sample_type_shift = 10; |
822 | pub const PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT: perf_branch_sample_type_shift = 11; |
823 | pub const PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT: perf_branch_sample_type_shift = 12; |
824 | pub const PERF_SAMPLE_BRANCH_CALL_SHIFT: perf_branch_sample_type_shift = 13; |
825 | pub const PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT: perf_branch_sample_type_shift = 14; |
826 | pub const PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT: perf_branch_sample_type_shift = 15; |
827 | pub const PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT: perf_branch_sample_type_shift = 16; |
828 | pub const PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT: perf_branch_sample_type_shift = 17; |
829 | pub const PERF_SAMPLE_BRANCH_MAX_SHIFT: perf_branch_sample_type_shift = 18; |
830 | pub type perf_branch_sample_type_shift = ::std::os::raw::c_uint; |
831 | pub const PERF_SAMPLE_BRANCH_USER: perf_branch_sample_type = 1; |
832 | pub const PERF_SAMPLE_BRANCH_KERNEL: perf_branch_sample_type = 2; |
833 | pub const PERF_SAMPLE_BRANCH_HV: perf_branch_sample_type = 4; |
834 | pub const PERF_SAMPLE_BRANCH_ANY: perf_branch_sample_type = 8; |
835 | pub const PERF_SAMPLE_BRANCH_ANY_CALL: perf_branch_sample_type = 16; |
836 | pub const PERF_SAMPLE_BRANCH_ANY_RETURN: perf_branch_sample_type = 32; |
837 | pub const PERF_SAMPLE_BRANCH_IND_CALL: perf_branch_sample_type = 64; |
838 | pub const PERF_SAMPLE_BRANCH_ABORT_TX: perf_branch_sample_type = 128; |
839 | pub const PERF_SAMPLE_BRANCH_IN_TX: perf_branch_sample_type = 256; |
840 | pub const PERF_SAMPLE_BRANCH_NO_TX: perf_branch_sample_type = 512; |
841 | pub const PERF_SAMPLE_BRANCH_COND: perf_branch_sample_type = 1024; |
842 | pub const PERF_SAMPLE_BRANCH_CALL_STACK: perf_branch_sample_type = 2048; |
843 | pub const PERF_SAMPLE_BRANCH_IND_JUMP: perf_branch_sample_type = 4096; |
844 | pub const PERF_SAMPLE_BRANCH_CALL: perf_branch_sample_type = 8192; |
845 | pub const PERF_SAMPLE_BRANCH_NO_FLAGS: perf_branch_sample_type = 16384; |
846 | pub const PERF_SAMPLE_BRANCH_NO_CYCLES: perf_branch_sample_type = 32768; |
847 | pub const PERF_SAMPLE_BRANCH_TYPE_SAVE: perf_branch_sample_type = 65536; |
848 | pub const PERF_SAMPLE_BRANCH_HW_INDEX: perf_branch_sample_type = 131072; |
849 | pub const PERF_SAMPLE_BRANCH_MAX: perf_branch_sample_type = 262144; |
850 | pub type perf_branch_sample_type = ::std::os::raw::c_uint; |
851 | pub const PERF_BR_UNKNOWN: ::std::os::raw::c_uint = 0; |
852 | pub const PERF_BR_COND: ::std::os::raw::c_uint = 1; |
853 | pub const PERF_BR_UNCOND: ::std::os::raw::c_uint = 2; |
854 | pub const PERF_BR_IND: ::std::os::raw::c_uint = 3; |
855 | pub const PERF_BR_CALL: ::std::os::raw::c_uint = 4; |
856 | pub const PERF_BR_IND_CALL: ::std::os::raw::c_uint = 5; |
857 | pub const PERF_BR_RET: ::std::os::raw::c_uint = 6; |
858 | pub const PERF_BR_SYSCALL: ::std::os::raw::c_uint = 7; |
859 | pub const PERF_BR_SYSRET: ::std::os::raw::c_uint = 8; |
860 | pub const PERF_BR_COND_CALL: ::std::os::raw::c_uint = 9; |
861 | pub const PERF_BR_COND_RET: ::std::os::raw::c_uint = 10; |
862 | pub const PERF_BR_ERET: ::std::os::raw::c_uint = 11; |
863 | pub const PERF_BR_IRQ: ::std::os::raw::c_uint = 12; |
864 | pub const PERF_BR_MAX: ::std::os::raw::c_uint = 13; |
865 | pub type _bindgen_ty_1 = ::std::os::raw::c_uint; |
866 | pub const PERF_SAMPLE_REGS_ABI_NONE: perf_sample_regs_abi = 0; |
867 | pub const PERF_SAMPLE_REGS_ABI_32: perf_sample_regs_abi = 1; |
868 | pub const PERF_SAMPLE_REGS_ABI_64: perf_sample_regs_abi = 2; |
869 | pub type perf_sample_regs_abi = ::std::os::raw::c_uint; |
870 | pub const PERF_TXN_ELISION: ::std::os::raw::c_ulong = 1; |
871 | pub const PERF_TXN_TRANSACTION: ::std::os::raw::c_ulong = 2; |
872 | pub const PERF_TXN_SYNC: ::std::os::raw::c_ulong = 4; |
873 | pub const PERF_TXN_ASYNC: ::std::os::raw::c_ulong = 8; |
874 | pub const PERF_TXN_RETRY: ::std::os::raw::c_ulong = 16; |
875 | pub const PERF_TXN_CONFLICT: ::std::os::raw::c_ulong = 32; |
876 | pub const PERF_TXN_CAPACITY_WRITE: ::std::os::raw::c_ulong = 64; |
877 | pub const PERF_TXN_CAPACITY_READ: ::std::os::raw::c_ulong = 128; |
878 | pub const PERF_TXN_MAX: ::std::os::raw::c_ulong = 256; |
879 | pub const PERF_TXN_ABORT_MASK: ::std::os::raw::c_ulong = 18446744069414584320; |
880 | pub const PERF_TXN_ABORT_SHIFT: ::std::os::raw::c_ulong = 32; |
881 | pub type _bindgen_ty_2 = ::std::os::raw::c_ulong; |
882 | pub const PERF_FORMAT_TOTAL_TIME_ENABLED: perf_event_read_format = 1; |
883 | pub const PERF_FORMAT_TOTAL_TIME_RUNNING: perf_event_read_format = 2; |
884 | pub const PERF_FORMAT_ID: perf_event_read_format = 4; |
885 | pub const PERF_FORMAT_GROUP: perf_event_read_format = 8; |
886 | pub const PERF_FORMAT_MAX: perf_event_read_format = 16; |
887 | pub type perf_event_read_format = ::std::os::raw::c_uint; |
888 | #[repr (C)] |
889 | #[derive (Copy, Clone)] |
890 | pub struct perf_event_attr { |
891 | pub type_: __u32, |
892 | pub size: __u32, |
893 | pub config: __u64, |
894 | pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, |
895 | pub sample_type: __u64, |
896 | pub read_format: __u64, |
897 | pub _bitfield_align_1: [u32; 0], |
898 | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, |
899 | pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, |
900 | pub bp_type: __u32, |
901 | pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, |
902 | pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, |
903 | pub branch_sample_type: __u64, |
904 | pub sample_regs_user: __u64, |
905 | pub sample_stack_user: __u32, |
906 | pub clockid: __s32, |
907 | pub sample_regs_intr: __u64, |
908 | pub aux_watermark: __u32, |
909 | pub sample_max_stack: __u16, |
910 | pub __reserved_2: __u16, |
911 | pub aux_sample_size: __u32, |
912 | pub __reserved_3: __u32, |
913 | pub sig_data: __u64, |
914 | } |
915 | #[repr (C)] |
916 | #[derive (Copy, Clone)] |
917 | pub union perf_event_attr__bindgen_ty_1 { |
918 | pub sample_period: __u64, |
919 | pub sample_freq: __u64, |
920 | } |
921 | #[test ] |
922 | fn bindgen_test_layout_perf_event_attr__bindgen_ty_1() { |
923 | assert_eq!( |
924 | ::std::mem::size_of::<perf_event_attr__bindgen_ty_1>(), |
925 | 8usize, |
926 | concat!("Size of: " , stringify!(perf_event_attr__bindgen_ty_1)) |
927 | ); |
928 | assert_eq!( |
929 | ::std::mem::align_of::<perf_event_attr__bindgen_ty_1>(), |
930 | 8usize, |
931 | concat!("Alignment of " , stringify!(perf_event_attr__bindgen_ty_1)) |
932 | ); |
933 | assert_eq!( |
934 | unsafe { |
935 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_1>())).sample_period as *const _ |
936 | as usize |
937 | }, |
938 | 0usize, |
939 | concat!( |
940 | "Offset of field: " , |
941 | stringify!(perf_event_attr__bindgen_ty_1), |
942 | "::" , |
943 | stringify!(sample_period) |
944 | ) |
945 | ); |
946 | assert_eq!( |
947 | unsafe { |
948 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_1>())).sample_freq as *const _ |
949 | as usize |
950 | }, |
951 | 0usize, |
952 | concat!( |
953 | "Offset of field: " , |
954 | stringify!(perf_event_attr__bindgen_ty_1), |
955 | "::" , |
956 | stringify!(sample_freq) |
957 | ) |
958 | ); |
959 | } |
960 | impl Default for perf_event_attr__bindgen_ty_1 { |
961 | fn default() -> Self { |
962 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
963 | unsafe { |
964 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
965 | s.assume_init() |
966 | } |
967 | } |
968 | } |
969 | #[repr (C)] |
970 | #[derive (Copy, Clone)] |
971 | pub union perf_event_attr__bindgen_ty_2 { |
972 | pub wakeup_events: __u32, |
973 | pub wakeup_watermark: __u32, |
974 | } |
975 | #[test ] |
976 | fn bindgen_test_layout_perf_event_attr__bindgen_ty_2() { |
977 | assert_eq!( |
978 | ::std::mem::size_of::<perf_event_attr__bindgen_ty_2>(), |
979 | 4usize, |
980 | concat!("Size of: " , stringify!(perf_event_attr__bindgen_ty_2)) |
981 | ); |
982 | assert_eq!( |
983 | ::std::mem::align_of::<perf_event_attr__bindgen_ty_2>(), |
984 | 4usize, |
985 | concat!("Alignment of " , stringify!(perf_event_attr__bindgen_ty_2)) |
986 | ); |
987 | assert_eq!( |
988 | unsafe { |
989 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_2>())).wakeup_events as *const _ |
990 | as usize |
991 | }, |
992 | 0usize, |
993 | concat!( |
994 | "Offset of field: " , |
995 | stringify!(perf_event_attr__bindgen_ty_2), |
996 | "::" , |
997 | stringify!(wakeup_events) |
998 | ) |
999 | ); |
1000 | assert_eq!( |
1001 | unsafe { |
1002 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_2>())).wakeup_watermark as *const _ |
1003 | as usize |
1004 | }, |
1005 | 0usize, |
1006 | concat!( |
1007 | "Offset of field: " , |
1008 | stringify!(perf_event_attr__bindgen_ty_2), |
1009 | "::" , |
1010 | stringify!(wakeup_watermark) |
1011 | ) |
1012 | ); |
1013 | } |
1014 | impl Default for perf_event_attr__bindgen_ty_2 { |
1015 | fn default() -> Self { |
1016 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
1017 | unsafe { |
1018 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
1019 | s.assume_init() |
1020 | } |
1021 | } |
1022 | } |
1023 | #[repr (C)] |
1024 | #[derive (Copy, Clone)] |
1025 | pub union perf_event_attr__bindgen_ty_3 { |
1026 | pub bp_addr: __u64, |
1027 | pub kprobe_func: __u64, |
1028 | pub uprobe_path: __u64, |
1029 | pub config1: __u64, |
1030 | } |
1031 | #[test ] |
1032 | fn bindgen_test_layout_perf_event_attr__bindgen_ty_3() { |
1033 | assert_eq!( |
1034 | ::std::mem::size_of::<perf_event_attr__bindgen_ty_3>(), |
1035 | 8usize, |
1036 | concat!("Size of: " , stringify!(perf_event_attr__bindgen_ty_3)) |
1037 | ); |
1038 | assert_eq!( |
1039 | ::std::mem::align_of::<perf_event_attr__bindgen_ty_3>(), |
1040 | 8usize, |
1041 | concat!("Alignment of " , stringify!(perf_event_attr__bindgen_ty_3)) |
1042 | ); |
1043 | assert_eq!( |
1044 | unsafe { |
1045 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_3>())).bp_addr as *const _ as usize |
1046 | }, |
1047 | 0usize, |
1048 | concat!( |
1049 | "Offset of field: " , |
1050 | stringify!(perf_event_attr__bindgen_ty_3), |
1051 | "::" , |
1052 | stringify!(bp_addr) |
1053 | ) |
1054 | ); |
1055 | assert_eq!( |
1056 | unsafe { |
1057 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_3>())).kprobe_func as *const _ |
1058 | as usize |
1059 | }, |
1060 | 0usize, |
1061 | concat!( |
1062 | "Offset of field: " , |
1063 | stringify!(perf_event_attr__bindgen_ty_3), |
1064 | "::" , |
1065 | stringify!(kprobe_func) |
1066 | ) |
1067 | ); |
1068 | assert_eq!( |
1069 | unsafe { |
1070 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_3>())).uprobe_path as *const _ |
1071 | as usize |
1072 | }, |
1073 | 0usize, |
1074 | concat!( |
1075 | "Offset of field: " , |
1076 | stringify!(perf_event_attr__bindgen_ty_3), |
1077 | "::" , |
1078 | stringify!(uprobe_path) |
1079 | ) |
1080 | ); |
1081 | assert_eq!( |
1082 | unsafe { |
1083 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_3>())).config1 as *const _ as usize |
1084 | }, |
1085 | 0usize, |
1086 | concat!( |
1087 | "Offset of field: " , |
1088 | stringify!(perf_event_attr__bindgen_ty_3), |
1089 | "::" , |
1090 | stringify!(config1) |
1091 | ) |
1092 | ); |
1093 | } |
1094 | impl Default for perf_event_attr__bindgen_ty_3 { |
1095 | fn default() -> Self { |
1096 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
1097 | unsafe { |
1098 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
1099 | s.assume_init() |
1100 | } |
1101 | } |
1102 | } |
1103 | #[repr (C)] |
1104 | #[derive (Copy, Clone)] |
1105 | pub union perf_event_attr__bindgen_ty_4 { |
1106 | pub bp_len: __u64, |
1107 | pub kprobe_addr: __u64, |
1108 | pub probe_offset: __u64, |
1109 | pub config2: __u64, |
1110 | } |
1111 | #[test ] |
1112 | fn bindgen_test_layout_perf_event_attr__bindgen_ty_4() { |
1113 | assert_eq!( |
1114 | ::std::mem::size_of::<perf_event_attr__bindgen_ty_4>(), |
1115 | 8usize, |
1116 | concat!("Size of: " , stringify!(perf_event_attr__bindgen_ty_4)) |
1117 | ); |
1118 | assert_eq!( |
1119 | ::std::mem::align_of::<perf_event_attr__bindgen_ty_4>(), |
1120 | 8usize, |
1121 | concat!("Alignment of " , stringify!(perf_event_attr__bindgen_ty_4)) |
1122 | ); |
1123 | assert_eq!( |
1124 | unsafe { |
1125 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_4>())).bp_len as *const _ as usize |
1126 | }, |
1127 | 0usize, |
1128 | concat!( |
1129 | "Offset of field: " , |
1130 | stringify!(perf_event_attr__bindgen_ty_4), |
1131 | "::" , |
1132 | stringify!(bp_len) |
1133 | ) |
1134 | ); |
1135 | assert_eq!( |
1136 | unsafe { |
1137 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_4>())).kprobe_addr as *const _ |
1138 | as usize |
1139 | }, |
1140 | 0usize, |
1141 | concat!( |
1142 | "Offset of field: " , |
1143 | stringify!(perf_event_attr__bindgen_ty_4), |
1144 | "::" , |
1145 | stringify!(kprobe_addr) |
1146 | ) |
1147 | ); |
1148 | assert_eq!( |
1149 | unsafe { |
1150 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_4>())).probe_offset as *const _ |
1151 | as usize |
1152 | }, |
1153 | 0usize, |
1154 | concat!( |
1155 | "Offset of field: " , |
1156 | stringify!(perf_event_attr__bindgen_ty_4), |
1157 | "::" , |
1158 | stringify!(probe_offset) |
1159 | ) |
1160 | ); |
1161 | assert_eq!( |
1162 | unsafe { |
1163 | &(*(::std::ptr::null::<perf_event_attr__bindgen_ty_4>())).config2 as *const _ as usize |
1164 | }, |
1165 | 0usize, |
1166 | concat!( |
1167 | "Offset of field: " , |
1168 | stringify!(perf_event_attr__bindgen_ty_4), |
1169 | "::" , |
1170 | stringify!(config2) |
1171 | ) |
1172 | ); |
1173 | } |
1174 | impl Default for perf_event_attr__bindgen_ty_4 { |
1175 | fn default() -> Self { |
1176 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
1177 | unsafe { |
1178 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
1179 | s.assume_init() |
1180 | } |
1181 | } |
1182 | } |
1183 | #[test ] |
1184 | fn bindgen_test_layout_perf_event_attr() { |
1185 | assert_eq!( |
1186 | ::std::mem::size_of::<perf_event_attr>(), |
1187 | 128usize, |
1188 | concat!("Size of: " , stringify!(perf_event_attr)) |
1189 | ); |
1190 | assert_eq!( |
1191 | ::std::mem::align_of::<perf_event_attr>(), |
1192 | 8usize, |
1193 | concat!("Alignment of " , stringify!(perf_event_attr)) |
1194 | ); |
1195 | assert_eq!( |
1196 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).type_ as *const _ as usize }, |
1197 | 0usize, |
1198 | concat!( |
1199 | "Offset of field: " , |
1200 | stringify!(perf_event_attr), |
1201 | "::" , |
1202 | stringify!(type_) |
1203 | ) |
1204 | ); |
1205 | assert_eq!( |
1206 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).size as *const _ as usize }, |
1207 | 4usize, |
1208 | concat!( |
1209 | "Offset of field: " , |
1210 | stringify!(perf_event_attr), |
1211 | "::" , |
1212 | stringify!(size) |
1213 | ) |
1214 | ); |
1215 | assert_eq!( |
1216 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).config as *const _ as usize }, |
1217 | 8usize, |
1218 | concat!( |
1219 | "Offset of field: " , |
1220 | stringify!(perf_event_attr), |
1221 | "::" , |
1222 | stringify!(config) |
1223 | ) |
1224 | ); |
1225 | assert_eq!( |
1226 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).sample_type as *const _ as usize }, |
1227 | 24usize, |
1228 | concat!( |
1229 | "Offset of field: " , |
1230 | stringify!(perf_event_attr), |
1231 | "::" , |
1232 | stringify!(sample_type) |
1233 | ) |
1234 | ); |
1235 | assert_eq!( |
1236 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).read_format as *const _ as usize }, |
1237 | 32usize, |
1238 | concat!( |
1239 | "Offset of field: " , |
1240 | stringify!(perf_event_attr), |
1241 | "::" , |
1242 | stringify!(read_format) |
1243 | ) |
1244 | ); |
1245 | assert_eq!( |
1246 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).bp_type as *const _ as usize }, |
1247 | 52usize, |
1248 | concat!( |
1249 | "Offset of field: " , |
1250 | stringify!(perf_event_attr), |
1251 | "::" , |
1252 | stringify!(bp_type) |
1253 | ) |
1254 | ); |
1255 | assert_eq!( |
1256 | unsafe { |
1257 | &(*(::std::ptr::null::<perf_event_attr>())).branch_sample_type as *const _ as usize |
1258 | }, |
1259 | 72usize, |
1260 | concat!( |
1261 | "Offset of field: " , |
1262 | stringify!(perf_event_attr), |
1263 | "::" , |
1264 | stringify!(branch_sample_type) |
1265 | ) |
1266 | ); |
1267 | assert_eq!( |
1268 | unsafe { |
1269 | &(*(::std::ptr::null::<perf_event_attr>())).sample_regs_user as *const _ as usize |
1270 | }, |
1271 | 80usize, |
1272 | concat!( |
1273 | "Offset of field: " , |
1274 | stringify!(perf_event_attr), |
1275 | "::" , |
1276 | stringify!(sample_regs_user) |
1277 | ) |
1278 | ); |
1279 | assert_eq!( |
1280 | unsafe { |
1281 | &(*(::std::ptr::null::<perf_event_attr>())).sample_stack_user as *const _ as usize |
1282 | }, |
1283 | 88usize, |
1284 | concat!( |
1285 | "Offset of field: " , |
1286 | stringify!(perf_event_attr), |
1287 | "::" , |
1288 | stringify!(sample_stack_user) |
1289 | ) |
1290 | ); |
1291 | assert_eq!( |
1292 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).clockid as *const _ as usize }, |
1293 | 92usize, |
1294 | concat!( |
1295 | "Offset of field: " , |
1296 | stringify!(perf_event_attr), |
1297 | "::" , |
1298 | stringify!(clockid) |
1299 | ) |
1300 | ); |
1301 | assert_eq!( |
1302 | unsafe { |
1303 | &(*(::std::ptr::null::<perf_event_attr>())).sample_regs_intr as *const _ as usize |
1304 | }, |
1305 | 96usize, |
1306 | concat!( |
1307 | "Offset of field: " , |
1308 | stringify!(perf_event_attr), |
1309 | "::" , |
1310 | stringify!(sample_regs_intr) |
1311 | ) |
1312 | ); |
1313 | assert_eq!( |
1314 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).aux_watermark as *const _ as usize }, |
1315 | 104usize, |
1316 | concat!( |
1317 | "Offset of field: " , |
1318 | stringify!(perf_event_attr), |
1319 | "::" , |
1320 | stringify!(aux_watermark) |
1321 | ) |
1322 | ); |
1323 | assert_eq!( |
1324 | unsafe { |
1325 | &(*(::std::ptr::null::<perf_event_attr>())).sample_max_stack as *const _ as usize |
1326 | }, |
1327 | 108usize, |
1328 | concat!( |
1329 | "Offset of field: " , |
1330 | stringify!(perf_event_attr), |
1331 | "::" , |
1332 | stringify!(sample_max_stack) |
1333 | ) |
1334 | ); |
1335 | assert_eq!( |
1336 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).__reserved_2 as *const _ as usize }, |
1337 | 110usize, |
1338 | concat!( |
1339 | "Offset of field: " , |
1340 | stringify!(perf_event_attr), |
1341 | "::" , |
1342 | stringify!(__reserved_2) |
1343 | ) |
1344 | ); |
1345 | assert_eq!( |
1346 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).aux_sample_size as *const _ as usize }, |
1347 | 112usize, |
1348 | concat!( |
1349 | "Offset of field: " , |
1350 | stringify!(perf_event_attr), |
1351 | "::" , |
1352 | stringify!(aux_sample_size) |
1353 | ) |
1354 | ); |
1355 | assert_eq!( |
1356 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).__reserved_3 as *const _ as usize }, |
1357 | 116usize, |
1358 | concat!( |
1359 | "Offset of field: " , |
1360 | stringify!(perf_event_attr), |
1361 | "::" , |
1362 | stringify!(__reserved_3) |
1363 | ) |
1364 | ); |
1365 | assert_eq!( |
1366 | unsafe { &(*(::std::ptr::null::<perf_event_attr>())).sig_data as *const _ as usize }, |
1367 | 120usize, |
1368 | concat!( |
1369 | "Offset of field: " , |
1370 | stringify!(perf_event_attr), |
1371 | "::" , |
1372 | stringify!(sig_data) |
1373 | ) |
1374 | ); |
1375 | } |
1376 | impl Default for perf_event_attr { |
1377 | fn default() -> Self { |
1378 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
1379 | unsafe { |
1380 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
1381 | s.assume_init() |
1382 | } |
1383 | } |
1384 | } |
1385 | impl perf_event_attr { |
1386 | #[inline ] |
1387 | pub fn disabled(&self) -> __u64 { |
1388 | unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } |
1389 | } |
1390 | #[inline ] |
1391 | pub fn set_disabled(&mut self, val: __u64) { |
1392 | unsafe { |
1393 | let val: u64 = ::std::mem::transmute(val); |
1394 | self._bitfield_1.set(0usize, 1u8, val as u64) |
1395 | } |
1396 | } |
1397 | #[inline ] |
1398 | pub fn inherit(&self) -> __u64 { |
1399 | unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } |
1400 | } |
1401 | #[inline ] |
1402 | pub fn set_inherit(&mut self, val: __u64) { |
1403 | unsafe { |
1404 | let val: u64 = ::std::mem::transmute(val); |
1405 | self._bitfield_1.set(1usize, 1u8, val as u64) |
1406 | } |
1407 | } |
1408 | #[inline ] |
1409 | pub fn pinned(&self) -> __u64 { |
1410 | unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } |
1411 | } |
1412 | #[inline ] |
1413 | pub fn set_pinned(&mut self, val: __u64) { |
1414 | unsafe { |
1415 | let val: u64 = ::std::mem::transmute(val); |
1416 | self._bitfield_1.set(2usize, 1u8, val as u64) |
1417 | } |
1418 | } |
1419 | #[inline ] |
1420 | pub fn exclusive(&self) -> __u64 { |
1421 | unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } |
1422 | } |
1423 | #[inline ] |
1424 | pub fn set_exclusive(&mut self, val: __u64) { |
1425 | unsafe { |
1426 | let val: u64 = ::std::mem::transmute(val); |
1427 | self._bitfield_1.set(3usize, 1u8, val as u64) |
1428 | } |
1429 | } |
1430 | #[inline ] |
1431 | pub fn exclude_user(&self) -> __u64 { |
1432 | unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } |
1433 | } |
1434 | #[inline ] |
1435 | pub fn set_exclude_user(&mut self, val: __u64) { |
1436 | unsafe { |
1437 | let val: u64 = ::std::mem::transmute(val); |
1438 | self._bitfield_1.set(4usize, 1u8, val as u64) |
1439 | } |
1440 | } |
1441 | #[inline ] |
1442 | pub fn exclude_kernel(&self) -> __u64 { |
1443 | unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } |
1444 | } |
1445 | #[inline ] |
1446 | pub fn set_exclude_kernel(&mut self, val: __u64) { |
1447 | unsafe { |
1448 | let val: u64 = ::std::mem::transmute(val); |
1449 | self._bitfield_1.set(5usize, 1u8, val as u64) |
1450 | } |
1451 | } |
1452 | #[inline ] |
1453 | pub fn exclude_hv(&self) -> __u64 { |
1454 | unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } |
1455 | } |
1456 | #[inline ] |
1457 | pub fn set_exclude_hv(&mut self, val: __u64) { |
1458 | unsafe { |
1459 | let val: u64 = ::std::mem::transmute(val); |
1460 | self._bitfield_1.set(6usize, 1u8, val as u64) |
1461 | } |
1462 | } |
1463 | #[inline ] |
1464 | pub fn exclude_idle(&self) -> __u64 { |
1465 | unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } |
1466 | } |
1467 | #[inline ] |
1468 | pub fn set_exclude_idle(&mut self, val: __u64) { |
1469 | unsafe { |
1470 | let val: u64 = ::std::mem::transmute(val); |
1471 | self._bitfield_1.set(7usize, 1u8, val as u64) |
1472 | } |
1473 | } |
1474 | #[inline ] |
1475 | pub fn mmap(&self) -> __u64 { |
1476 | unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } |
1477 | } |
1478 | #[inline ] |
1479 | pub fn set_mmap(&mut self, val: __u64) { |
1480 | unsafe { |
1481 | let val: u64 = ::std::mem::transmute(val); |
1482 | self._bitfield_1.set(8usize, 1u8, val as u64) |
1483 | } |
1484 | } |
1485 | #[inline ] |
1486 | pub fn comm(&self) -> __u64 { |
1487 | unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } |
1488 | } |
1489 | #[inline ] |
1490 | pub fn set_comm(&mut self, val: __u64) { |
1491 | unsafe { |
1492 | let val: u64 = ::std::mem::transmute(val); |
1493 | self._bitfield_1.set(9usize, 1u8, val as u64) |
1494 | } |
1495 | } |
1496 | #[inline ] |
1497 | pub fn freq(&self) -> __u64 { |
1498 | unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } |
1499 | } |
1500 | #[inline ] |
1501 | pub fn set_freq(&mut self, val: __u64) { |
1502 | unsafe { |
1503 | let val: u64 = ::std::mem::transmute(val); |
1504 | self._bitfield_1.set(10usize, 1u8, val as u64) |
1505 | } |
1506 | } |
1507 | #[inline ] |
1508 | pub fn inherit_stat(&self) -> __u64 { |
1509 | unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } |
1510 | } |
1511 | #[inline ] |
1512 | pub fn set_inherit_stat(&mut self, val: __u64) { |
1513 | unsafe { |
1514 | let val: u64 = ::std::mem::transmute(val); |
1515 | self._bitfield_1.set(11usize, 1u8, val as u64) |
1516 | } |
1517 | } |
1518 | #[inline ] |
1519 | pub fn enable_on_exec(&self) -> __u64 { |
1520 | unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } |
1521 | } |
1522 | #[inline ] |
1523 | pub fn set_enable_on_exec(&mut self, val: __u64) { |
1524 | unsafe { |
1525 | let val: u64 = ::std::mem::transmute(val); |
1526 | self._bitfield_1.set(12usize, 1u8, val as u64) |
1527 | } |
1528 | } |
1529 | #[inline ] |
1530 | pub fn task(&self) -> __u64 { |
1531 | unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } |
1532 | } |
1533 | #[inline ] |
1534 | pub fn set_task(&mut self, val: __u64) { |
1535 | unsafe { |
1536 | let val: u64 = ::std::mem::transmute(val); |
1537 | self._bitfield_1.set(13usize, 1u8, val as u64) |
1538 | } |
1539 | } |
1540 | #[inline ] |
1541 | pub fn watermark(&self) -> __u64 { |
1542 | unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } |
1543 | } |
1544 | #[inline ] |
1545 | pub fn set_watermark(&mut self, val: __u64) { |
1546 | unsafe { |
1547 | let val: u64 = ::std::mem::transmute(val); |
1548 | self._bitfield_1.set(14usize, 1u8, val as u64) |
1549 | } |
1550 | } |
1551 | #[inline ] |
1552 | pub fn precise_ip(&self) -> __u64 { |
1553 | unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } |
1554 | } |
1555 | #[inline ] |
1556 | pub fn set_precise_ip(&mut self, val: __u64) { |
1557 | unsafe { |
1558 | let val: u64 = ::std::mem::transmute(val); |
1559 | self._bitfield_1.set(15usize, 2u8, val as u64) |
1560 | } |
1561 | } |
1562 | #[inline ] |
1563 | pub fn mmap_data(&self) -> __u64 { |
1564 | unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } |
1565 | } |
1566 | #[inline ] |
1567 | pub fn set_mmap_data(&mut self, val: __u64) { |
1568 | unsafe { |
1569 | let val: u64 = ::std::mem::transmute(val); |
1570 | self._bitfield_1.set(17usize, 1u8, val as u64) |
1571 | } |
1572 | } |
1573 | #[inline ] |
1574 | pub fn sample_id_all(&self) -> __u64 { |
1575 | unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } |
1576 | } |
1577 | #[inline ] |
1578 | pub fn set_sample_id_all(&mut self, val: __u64) { |
1579 | unsafe { |
1580 | let val: u64 = ::std::mem::transmute(val); |
1581 | self._bitfield_1.set(18usize, 1u8, val as u64) |
1582 | } |
1583 | } |
1584 | #[inline ] |
1585 | pub fn exclude_host(&self) -> __u64 { |
1586 | unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } |
1587 | } |
1588 | #[inline ] |
1589 | pub fn set_exclude_host(&mut self, val: __u64) { |
1590 | unsafe { |
1591 | let val: u64 = ::std::mem::transmute(val); |
1592 | self._bitfield_1.set(19usize, 1u8, val as u64) |
1593 | } |
1594 | } |
1595 | #[inline ] |
1596 | pub fn exclude_guest(&self) -> __u64 { |
1597 | unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } |
1598 | } |
1599 | #[inline ] |
1600 | pub fn set_exclude_guest(&mut self, val: __u64) { |
1601 | unsafe { |
1602 | let val: u64 = ::std::mem::transmute(val); |
1603 | self._bitfield_1.set(20usize, 1u8, val as u64) |
1604 | } |
1605 | } |
1606 | #[inline ] |
1607 | pub fn exclude_callchain_kernel(&self) -> __u64 { |
1608 | unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } |
1609 | } |
1610 | #[inline ] |
1611 | pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { |
1612 | unsafe { |
1613 | let val: u64 = ::std::mem::transmute(val); |
1614 | self._bitfield_1.set(21usize, 1u8, val as u64) |
1615 | } |
1616 | } |
1617 | #[inline ] |
1618 | pub fn exclude_callchain_user(&self) -> __u64 { |
1619 | unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } |
1620 | } |
1621 | #[inline ] |
1622 | pub fn set_exclude_callchain_user(&mut self, val: __u64) { |
1623 | unsafe { |
1624 | let val: u64 = ::std::mem::transmute(val); |
1625 | self._bitfield_1.set(22usize, 1u8, val as u64) |
1626 | } |
1627 | } |
1628 | #[inline ] |
1629 | pub fn mmap2(&self) -> __u64 { |
1630 | unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } |
1631 | } |
1632 | #[inline ] |
1633 | pub fn set_mmap2(&mut self, val: __u64) { |
1634 | unsafe { |
1635 | let val: u64 = ::std::mem::transmute(val); |
1636 | self._bitfield_1.set(23usize, 1u8, val as u64) |
1637 | } |
1638 | } |
1639 | #[inline ] |
1640 | pub fn comm_exec(&self) -> __u64 { |
1641 | unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } |
1642 | } |
1643 | #[inline ] |
1644 | pub fn set_comm_exec(&mut self, val: __u64) { |
1645 | unsafe { |
1646 | let val: u64 = ::std::mem::transmute(val); |
1647 | self._bitfield_1.set(24usize, 1u8, val as u64) |
1648 | } |
1649 | } |
1650 | #[inline ] |
1651 | pub fn use_clockid(&self) -> __u64 { |
1652 | unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } |
1653 | } |
1654 | #[inline ] |
1655 | pub fn set_use_clockid(&mut self, val: __u64) { |
1656 | unsafe { |
1657 | let val: u64 = ::std::mem::transmute(val); |
1658 | self._bitfield_1.set(25usize, 1u8, val as u64) |
1659 | } |
1660 | } |
1661 | #[inline ] |
1662 | pub fn context_switch(&self) -> __u64 { |
1663 | unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } |
1664 | } |
1665 | #[inline ] |
1666 | pub fn set_context_switch(&mut self, val: __u64) { |
1667 | unsafe { |
1668 | let val: u64 = ::std::mem::transmute(val); |
1669 | self._bitfield_1.set(26usize, 1u8, val as u64) |
1670 | } |
1671 | } |
1672 | #[inline ] |
1673 | pub fn write_backward(&self) -> __u64 { |
1674 | unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } |
1675 | } |
1676 | #[inline ] |
1677 | pub fn set_write_backward(&mut self, val: __u64) { |
1678 | unsafe { |
1679 | let val: u64 = ::std::mem::transmute(val); |
1680 | self._bitfield_1.set(27usize, 1u8, val as u64) |
1681 | } |
1682 | } |
1683 | #[inline ] |
1684 | pub fn namespaces(&self) -> __u64 { |
1685 | unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } |
1686 | } |
1687 | #[inline ] |
1688 | pub fn set_namespaces(&mut self, val: __u64) { |
1689 | unsafe { |
1690 | let val: u64 = ::std::mem::transmute(val); |
1691 | self._bitfield_1.set(28usize, 1u8, val as u64) |
1692 | } |
1693 | } |
1694 | #[inline ] |
1695 | pub fn ksymbol(&self) -> __u64 { |
1696 | unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } |
1697 | } |
1698 | #[inline ] |
1699 | pub fn set_ksymbol(&mut self, val: __u64) { |
1700 | unsafe { |
1701 | let val: u64 = ::std::mem::transmute(val); |
1702 | self._bitfield_1.set(29usize, 1u8, val as u64) |
1703 | } |
1704 | } |
1705 | #[inline ] |
1706 | pub fn bpf_event(&self) -> __u64 { |
1707 | unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } |
1708 | } |
1709 | #[inline ] |
1710 | pub fn set_bpf_event(&mut self, val: __u64) { |
1711 | unsafe { |
1712 | let val: u64 = ::std::mem::transmute(val); |
1713 | self._bitfield_1.set(30usize, 1u8, val as u64) |
1714 | } |
1715 | } |
1716 | #[inline ] |
1717 | pub fn aux_output(&self) -> __u64 { |
1718 | unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } |
1719 | } |
1720 | #[inline ] |
1721 | pub fn set_aux_output(&mut self, val: __u64) { |
1722 | unsafe { |
1723 | let val: u64 = ::std::mem::transmute(val); |
1724 | self._bitfield_1.set(31usize, 1u8, val as u64) |
1725 | } |
1726 | } |
1727 | #[inline ] |
1728 | pub fn cgroup(&self) -> __u64 { |
1729 | unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } |
1730 | } |
1731 | #[inline ] |
1732 | pub fn set_cgroup(&mut self, val: __u64) { |
1733 | unsafe { |
1734 | let val: u64 = ::std::mem::transmute(val); |
1735 | self._bitfield_1.set(32usize, 1u8, val as u64) |
1736 | } |
1737 | } |
1738 | #[inline ] |
1739 | pub fn text_poke(&self) -> __u64 { |
1740 | unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } |
1741 | } |
1742 | #[inline ] |
1743 | pub fn set_text_poke(&mut self, val: __u64) { |
1744 | unsafe { |
1745 | let val: u64 = ::std::mem::transmute(val); |
1746 | self._bitfield_1.set(33usize, 1u8, val as u64) |
1747 | } |
1748 | } |
1749 | #[inline ] |
1750 | pub fn build_id(&self) -> __u64 { |
1751 | unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } |
1752 | } |
1753 | #[inline ] |
1754 | pub fn set_build_id(&mut self, val: __u64) { |
1755 | unsafe { |
1756 | let val: u64 = ::std::mem::transmute(val); |
1757 | self._bitfield_1.set(34usize, 1u8, val as u64) |
1758 | } |
1759 | } |
1760 | #[inline ] |
1761 | pub fn inherit_thread(&self) -> __u64 { |
1762 | unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } |
1763 | } |
1764 | #[inline ] |
1765 | pub fn set_inherit_thread(&mut self, val: __u64) { |
1766 | unsafe { |
1767 | let val: u64 = ::std::mem::transmute(val); |
1768 | self._bitfield_1.set(35usize, 1u8, val as u64) |
1769 | } |
1770 | } |
1771 | #[inline ] |
1772 | pub fn remove_on_exec(&self) -> __u64 { |
1773 | unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } |
1774 | } |
1775 | #[inline ] |
1776 | pub fn set_remove_on_exec(&mut self, val: __u64) { |
1777 | unsafe { |
1778 | let val: u64 = ::std::mem::transmute(val); |
1779 | self._bitfield_1.set(36usize, 1u8, val as u64) |
1780 | } |
1781 | } |
1782 | #[inline ] |
1783 | pub fn sigtrap(&self) -> __u64 { |
1784 | unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } |
1785 | } |
1786 | #[inline ] |
1787 | pub fn set_sigtrap(&mut self, val: __u64) { |
1788 | unsafe { |
1789 | let val: u64 = ::std::mem::transmute(val); |
1790 | self._bitfield_1.set(37usize, 1u8, val as u64) |
1791 | } |
1792 | } |
1793 | #[inline ] |
1794 | pub fn __reserved_1(&self) -> __u64 { |
1795 | unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } |
1796 | } |
1797 | #[inline ] |
1798 | pub fn set___reserved_1(&mut self, val: __u64) { |
1799 | unsafe { |
1800 | let val: u64 = ::std::mem::transmute(val); |
1801 | self._bitfield_1.set(38usize, 26u8, val as u64) |
1802 | } |
1803 | } |
1804 | #[inline ] |
1805 | pub fn new_bitfield_1( |
1806 | disabled: __u64, |
1807 | inherit: __u64, |
1808 | pinned: __u64, |
1809 | exclusive: __u64, |
1810 | exclude_user: __u64, |
1811 | exclude_kernel: __u64, |
1812 | exclude_hv: __u64, |
1813 | exclude_idle: __u64, |
1814 | mmap: __u64, |
1815 | comm: __u64, |
1816 | freq: __u64, |
1817 | inherit_stat: __u64, |
1818 | enable_on_exec: __u64, |
1819 | task: __u64, |
1820 | watermark: __u64, |
1821 | precise_ip: __u64, |
1822 | mmap_data: __u64, |
1823 | sample_id_all: __u64, |
1824 | exclude_host: __u64, |
1825 | exclude_guest: __u64, |
1826 | exclude_callchain_kernel: __u64, |
1827 | exclude_callchain_user: __u64, |
1828 | mmap2: __u64, |
1829 | comm_exec: __u64, |
1830 | use_clockid: __u64, |
1831 | context_switch: __u64, |
1832 | write_backward: __u64, |
1833 | namespaces: __u64, |
1834 | ksymbol: __u64, |
1835 | bpf_event: __u64, |
1836 | aux_output: __u64, |
1837 | cgroup: __u64, |
1838 | text_poke: __u64, |
1839 | build_id: __u64, |
1840 | inherit_thread: __u64, |
1841 | remove_on_exec: __u64, |
1842 | sigtrap: __u64, |
1843 | __reserved_1: __u64, |
1844 | ) -> __BindgenBitfieldUnit<[u8; 8usize]> { |
1845 | let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); |
1846 | __bindgen_bitfield_unit.set(0usize, 1u8, { |
1847 | let disabled: u64 = unsafe { ::std::mem::transmute(disabled) }; |
1848 | disabled as u64 |
1849 | }); |
1850 | __bindgen_bitfield_unit.set(1usize, 1u8, { |
1851 | let inherit: u64 = unsafe { ::std::mem::transmute(inherit) }; |
1852 | inherit as u64 |
1853 | }); |
1854 | __bindgen_bitfield_unit.set(2usize, 1u8, { |
1855 | let pinned: u64 = unsafe { ::std::mem::transmute(pinned) }; |
1856 | pinned as u64 |
1857 | }); |
1858 | __bindgen_bitfield_unit.set(3usize, 1u8, { |
1859 | let exclusive: u64 = unsafe { ::std::mem::transmute(exclusive) }; |
1860 | exclusive as u64 |
1861 | }); |
1862 | __bindgen_bitfield_unit.set(4usize, 1u8, { |
1863 | let exclude_user: u64 = unsafe { ::std::mem::transmute(exclude_user) }; |
1864 | exclude_user as u64 |
1865 | }); |
1866 | __bindgen_bitfield_unit.set(5usize, 1u8, { |
1867 | let exclude_kernel: u64 = unsafe { ::std::mem::transmute(exclude_kernel) }; |
1868 | exclude_kernel as u64 |
1869 | }); |
1870 | __bindgen_bitfield_unit.set(6usize, 1u8, { |
1871 | let exclude_hv: u64 = unsafe { ::std::mem::transmute(exclude_hv) }; |
1872 | exclude_hv as u64 |
1873 | }); |
1874 | __bindgen_bitfield_unit.set(7usize, 1u8, { |
1875 | let exclude_idle: u64 = unsafe { ::std::mem::transmute(exclude_idle) }; |
1876 | exclude_idle as u64 |
1877 | }); |
1878 | __bindgen_bitfield_unit.set(8usize, 1u8, { |
1879 | let mmap: u64 = unsafe { ::std::mem::transmute(mmap) }; |
1880 | mmap as u64 |
1881 | }); |
1882 | __bindgen_bitfield_unit.set(9usize, 1u8, { |
1883 | let comm: u64 = unsafe { ::std::mem::transmute(comm) }; |
1884 | comm as u64 |
1885 | }); |
1886 | __bindgen_bitfield_unit.set(10usize, 1u8, { |
1887 | let freq: u64 = unsafe { ::std::mem::transmute(freq) }; |
1888 | freq as u64 |
1889 | }); |
1890 | __bindgen_bitfield_unit.set(11usize, 1u8, { |
1891 | let inherit_stat: u64 = unsafe { ::std::mem::transmute(inherit_stat) }; |
1892 | inherit_stat as u64 |
1893 | }); |
1894 | __bindgen_bitfield_unit.set(12usize, 1u8, { |
1895 | let enable_on_exec: u64 = unsafe { ::std::mem::transmute(enable_on_exec) }; |
1896 | enable_on_exec as u64 |
1897 | }); |
1898 | __bindgen_bitfield_unit.set(13usize, 1u8, { |
1899 | let task: u64 = unsafe { ::std::mem::transmute(task) }; |
1900 | task as u64 |
1901 | }); |
1902 | __bindgen_bitfield_unit.set(14usize, 1u8, { |
1903 | let watermark: u64 = unsafe { ::std::mem::transmute(watermark) }; |
1904 | watermark as u64 |
1905 | }); |
1906 | __bindgen_bitfield_unit.set(15usize, 2u8, { |
1907 | let precise_ip: u64 = unsafe { ::std::mem::transmute(precise_ip) }; |
1908 | precise_ip as u64 |
1909 | }); |
1910 | __bindgen_bitfield_unit.set(17usize, 1u8, { |
1911 | let mmap_data: u64 = unsafe { ::std::mem::transmute(mmap_data) }; |
1912 | mmap_data as u64 |
1913 | }); |
1914 | __bindgen_bitfield_unit.set(18usize, 1u8, { |
1915 | let sample_id_all: u64 = unsafe { ::std::mem::transmute(sample_id_all) }; |
1916 | sample_id_all as u64 |
1917 | }); |
1918 | __bindgen_bitfield_unit.set(19usize, 1u8, { |
1919 | let exclude_host: u64 = unsafe { ::std::mem::transmute(exclude_host) }; |
1920 | exclude_host as u64 |
1921 | }); |
1922 | __bindgen_bitfield_unit.set(20usize, 1u8, { |
1923 | let exclude_guest: u64 = unsafe { ::std::mem::transmute(exclude_guest) }; |
1924 | exclude_guest as u64 |
1925 | }); |
1926 | __bindgen_bitfield_unit.set(21usize, 1u8, { |
1927 | let exclude_callchain_kernel: u64 = |
1928 | unsafe { ::std::mem::transmute(exclude_callchain_kernel) }; |
1929 | exclude_callchain_kernel as u64 |
1930 | }); |
1931 | __bindgen_bitfield_unit.set(22usize, 1u8, { |
1932 | let exclude_callchain_user: u64 = |
1933 | unsafe { ::std::mem::transmute(exclude_callchain_user) }; |
1934 | exclude_callchain_user as u64 |
1935 | }); |
1936 | __bindgen_bitfield_unit.set(23usize, 1u8, { |
1937 | let mmap2: u64 = unsafe { ::std::mem::transmute(mmap2) }; |
1938 | mmap2 as u64 |
1939 | }); |
1940 | __bindgen_bitfield_unit.set(24usize, 1u8, { |
1941 | let comm_exec: u64 = unsafe { ::std::mem::transmute(comm_exec) }; |
1942 | comm_exec as u64 |
1943 | }); |
1944 | __bindgen_bitfield_unit.set(25usize, 1u8, { |
1945 | let use_clockid: u64 = unsafe { ::std::mem::transmute(use_clockid) }; |
1946 | use_clockid as u64 |
1947 | }); |
1948 | __bindgen_bitfield_unit.set(26usize, 1u8, { |
1949 | let context_switch: u64 = unsafe { ::std::mem::transmute(context_switch) }; |
1950 | context_switch as u64 |
1951 | }); |
1952 | __bindgen_bitfield_unit.set(27usize, 1u8, { |
1953 | let write_backward: u64 = unsafe { ::std::mem::transmute(write_backward) }; |
1954 | write_backward as u64 |
1955 | }); |
1956 | __bindgen_bitfield_unit.set(28usize, 1u8, { |
1957 | let namespaces: u64 = unsafe { ::std::mem::transmute(namespaces) }; |
1958 | namespaces as u64 |
1959 | }); |
1960 | __bindgen_bitfield_unit.set(29usize, 1u8, { |
1961 | let ksymbol: u64 = unsafe { ::std::mem::transmute(ksymbol) }; |
1962 | ksymbol as u64 |
1963 | }); |
1964 | __bindgen_bitfield_unit.set(30usize, 1u8, { |
1965 | let bpf_event: u64 = unsafe { ::std::mem::transmute(bpf_event) }; |
1966 | bpf_event as u64 |
1967 | }); |
1968 | __bindgen_bitfield_unit.set(31usize, 1u8, { |
1969 | let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; |
1970 | aux_output as u64 |
1971 | }); |
1972 | __bindgen_bitfield_unit.set(32usize, 1u8, { |
1973 | let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) }; |
1974 | cgroup as u64 |
1975 | }); |
1976 | __bindgen_bitfield_unit.set(33usize, 1u8, { |
1977 | let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) }; |
1978 | text_poke as u64 |
1979 | }); |
1980 | __bindgen_bitfield_unit.set(34usize, 1u8, { |
1981 | let build_id: u64 = unsafe { ::std::mem::transmute(build_id) }; |
1982 | build_id as u64 |
1983 | }); |
1984 | __bindgen_bitfield_unit.set(35usize, 1u8, { |
1985 | let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) }; |
1986 | inherit_thread as u64 |
1987 | }); |
1988 | __bindgen_bitfield_unit.set(36usize, 1u8, { |
1989 | let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) }; |
1990 | remove_on_exec as u64 |
1991 | }); |
1992 | __bindgen_bitfield_unit.set(37usize, 1u8, { |
1993 | let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) }; |
1994 | sigtrap as u64 |
1995 | }); |
1996 | __bindgen_bitfield_unit.set(38usize, 26u8, { |
1997 | let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; |
1998 | __reserved_1 as u64 |
1999 | }); |
2000 | __bindgen_bitfield_unit |
2001 | } |
2002 | } |
2003 | #[repr (C)] |
2004 | #[derive (Debug, Default)] |
2005 | pub struct perf_event_query_bpf { |
2006 | pub ids_len: __u32, |
2007 | pub prog_cnt: __u32, |
2008 | pub ids: __IncompleteArrayField<__u32>, |
2009 | } |
2010 | #[test ] |
2011 | fn bindgen_test_layout_perf_event_query_bpf() { |
2012 | assert_eq!( |
2013 | ::std::mem::size_of::<perf_event_query_bpf>(), |
2014 | 8usize, |
2015 | concat!("Size of: " , stringify!(perf_event_query_bpf)) |
2016 | ); |
2017 | assert_eq!( |
2018 | ::std::mem::align_of::<perf_event_query_bpf>(), |
2019 | 4usize, |
2020 | concat!("Alignment of " , stringify!(perf_event_query_bpf)) |
2021 | ); |
2022 | assert_eq!( |
2023 | unsafe { &(*(::std::ptr::null::<perf_event_query_bpf>())).ids_len as *const _ as usize }, |
2024 | 0usize, |
2025 | concat!( |
2026 | "Offset of field: " , |
2027 | stringify!(perf_event_query_bpf), |
2028 | "::" , |
2029 | stringify!(ids_len) |
2030 | ) |
2031 | ); |
2032 | assert_eq!( |
2033 | unsafe { &(*(::std::ptr::null::<perf_event_query_bpf>())).prog_cnt as *const _ as usize }, |
2034 | 4usize, |
2035 | concat!( |
2036 | "Offset of field: " , |
2037 | stringify!(perf_event_query_bpf), |
2038 | "::" , |
2039 | stringify!(prog_cnt) |
2040 | ) |
2041 | ); |
2042 | assert_eq!( |
2043 | unsafe { &(*(::std::ptr::null::<perf_event_query_bpf>())).ids as *const _ as usize }, |
2044 | 8usize, |
2045 | concat!( |
2046 | "Offset of field: " , |
2047 | stringify!(perf_event_query_bpf), |
2048 | "::" , |
2049 | stringify!(ids) |
2050 | ) |
2051 | ); |
2052 | } |
2053 | pub const PERF_IOC_FLAG_GROUP: perf_event_ioc_flags = 1; |
2054 | pub type perf_event_ioc_flags = ::std::os::raw::c_uint; |
2055 | #[repr (C)] |
2056 | #[derive (Copy, Clone)] |
2057 | pub struct perf_event_mmap_page { |
2058 | pub version: __u32, |
2059 | pub compat_version: __u32, |
2060 | pub lock: __u32, |
2061 | pub index: __u32, |
2062 | pub offset: __s64, |
2063 | pub time_enabled: __u64, |
2064 | pub time_running: __u64, |
2065 | pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, |
2066 | pub pmc_width: __u16, |
2067 | pub time_shift: __u16, |
2068 | pub time_mult: __u32, |
2069 | pub time_offset: __u64, |
2070 | pub time_zero: __u64, |
2071 | pub size: __u32, |
2072 | pub __reserved_1: __u32, |
2073 | pub time_cycles: __u64, |
2074 | pub time_mask: __u64, |
2075 | pub __reserved: [__u8; 928usize], |
2076 | pub data_head: __u64, |
2077 | pub data_tail: __u64, |
2078 | pub data_offset: __u64, |
2079 | pub data_size: __u64, |
2080 | pub aux_head: __u64, |
2081 | pub aux_tail: __u64, |
2082 | pub aux_offset: __u64, |
2083 | pub aux_size: __u64, |
2084 | } |
2085 | #[repr (C)] |
2086 | #[derive (Copy, Clone)] |
2087 | pub union perf_event_mmap_page__bindgen_ty_1 { |
2088 | pub capabilities: __u64, |
2089 | pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, |
2090 | } |
2091 | #[repr (C)] |
2092 | #[repr (align(8))] |
2093 | #[derive (Debug, Default, Copy, Clone)] |
2094 | pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { |
2095 | pub _bitfield_align_1: [u64; 0], |
2096 | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, |
2097 | } |
2098 | #[test ] |
2099 | fn bindgen_test_layout_perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1() { |
2100 | assert_eq!( |
2101 | ::std::mem::size_of::<perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1>(), |
2102 | 8usize, |
2103 | concat!( |
2104 | "Size of: " , |
2105 | stringify!(perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1) |
2106 | ) |
2107 | ); |
2108 | assert_eq!( |
2109 | ::std::mem::align_of::<perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1>(), |
2110 | 8usize, |
2111 | concat!( |
2112 | "Alignment of " , |
2113 | stringify!(perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1) |
2114 | ) |
2115 | ); |
2116 | } |
2117 | impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { |
2118 | #[inline ] |
2119 | pub fn cap_bit0(&self) -> __u64 { |
2120 | unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } |
2121 | } |
2122 | #[inline ] |
2123 | pub fn set_cap_bit0(&mut self, val: __u64) { |
2124 | unsafe { |
2125 | let val: u64 = ::std::mem::transmute(val); |
2126 | self._bitfield_1.set(0usize, 1u8, val as u64) |
2127 | } |
2128 | } |
2129 | #[inline ] |
2130 | pub fn cap_bit0_is_deprecated(&self) -> __u64 { |
2131 | unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } |
2132 | } |
2133 | #[inline ] |
2134 | pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { |
2135 | unsafe { |
2136 | let val: u64 = ::std::mem::transmute(val); |
2137 | self._bitfield_1.set(1usize, 1u8, val as u64) |
2138 | } |
2139 | } |
2140 | #[inline ] |
2141 | pub fn cap_user_rdpmc(&self) -> __u64 { |
2142 | unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } |
2143 | } |
2144 | #[inline ] |
2145 | pub fn set_cap_user_rdpmc(&mut self, val: __u64) { |
2146 | unsafe { |
2147 | let val: u64 = ::std::mem::transmute(val); |
2148 | self._bitfield_1.set(2usize, 1u8, val as u64) |
2149 | } |
2150 | } |
2151 | #[inline ] |
2152 | pub fn cap_user_time(&self) -> __u64 { |
2153 | unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } |
2154 | } |
2155 | #[inline ] |
2156 | pub fn set_cap_user_time(&mut self, val: __u64) { |
2157 | unsafe { |
2158 | let val: u64 = ::std::mem::transmute(val); |
2159 | self._bitfield_1.set(3usize, 1u8, val as u64) |
2160 | } |
2161 | } |
2162 | #[inline ] |
2163 | pub fn cap_user_time_zero(&self) -> __u64 { |
2164 | unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } |
2165 | } |
2166 | #[inline ] |
2167 | pub fn set_cap_user_time_zero(&mut self, val: __u64) { |
2168 | unsafe { |
2169 | let val: u64 = ::std::mem::transmute(val); |
2170 | self._bitfield_1.set(4usize, 1u8, val as u64) |
2171 | } |
2172 | } |
2173 | #[inline ] |
2174 | pub fn cap_user_time_short(&self) -> __u64 { |
2175 | unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } |
2176 | } |
2177 | #[inline ] |
2178 | pub fn set_cap_user_time_short(&mut self, val: __u64) { |
2179 | unsafe { |
2180 | let val: u64 = ::std::mem::transmute(val); |
2181 | self._bitfield_1.set(5usize, 1u8, val as u64) |
2182 | } |
2183 | } |
2184 | #[inline ] |
2185 | pub fn cap_____res(&self) -> __u64 { |
2186 | unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } |
2187 | } |
2188 | #[inline ] |
2189 | pub fn set_cap_____res(&mut self, val: __u64) { |
2190 | unsafe { |
2191 | let val: u64 = ::std::mem::transmute(val); |
2192 | self._bitfield_1.set(6usize, 58u8, val as u64) |
2193 | } |
2194 | } |
2195 | #[inline ] |
2196 | pub fn new_bitfield_1( |
2197 | cap_bit0: __u64, |
2198 | cap_bit0_is_deprecated: __u64, |
2199 | cap_user_rdpmc: __u64, |
2200 | cap_user_time: __u64, |
2201 | cap_user_time_zero: __u64, |
2202 | cap_user_time_short: __u64, |
2203 | cap_____res: __u64, |
2204 | ) -> __BindgenBitfieldUnit<[u8; 8usize]> { |
2205 | let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); |
2206 | __bindgen_bitfield_unit.set(0usize, 1u8, { |
2207 | let cap_bit0: u64 = unsafe { ::std::mem::transmute(cap_bit0) }; |
2208 | cap_bit0 as u64 |
2209 | }); |
2210 | __bindgen_bitfield_unit.set(1usize, 1u8, { |
2211 | let cap_bit0_is_deprecated: u64 = |
2212 | unsafe { ::std::mem::transmute(cap_bit0_is_deprecated) }; |
2213 | cap_bit0_is_deprecated as u64 |
2214 | }); |
2215 | __bindgen_bitfield_unit.set(2usize, 1u8, { |
2216 | let cap_user_rdpmc: u64 = unsafe { ::std::mem::transmute(cap_user_rdpmc) }; |
2217 | cap_user_rdpmc as u64 |
2218 | }); |
2219 | __bindgen_bitfield_unit.set(3usize, 1u8, { |
2220 | let cap_user_time: u64 = unsafe { ::std::mem::transmute(cap_user_time) }; |
2221 | cap_user_time as u64 |
2222 | }); |
2223 | __bindgen_bitfield_unit.set(4usize, 1u8, { |
2224 | let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) }; |
2225 | cap_user_time_zero as u64 |
2226 | }); |
2227 | __bindgen_bitfield_unit.set(5usize, 1u8, { |
2228 | let cap_user_time_short: u64 = unsafe { ::std::mem::transmute(cap_user_time_short) }; |
2229 | cap_user_time_short as u64 |
2230 | }); |
2231 | __bindgen_bitfield_unit.set(6usize, 58u8, { |
2232 | let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; |
2233 | cap_____res as u64 |
2234 | }); |
2235 | __bindgen_bitfield_unit |
2236 | } |
2237 | } |
2238 | #[test ] |
2239 | fn bindgen_test_layout_perf_event_mmap_page__bindgen_ty_1() { |
2240 | assert_eq!( |
2241 | ::std::mem::size_of::<perf_event_mmap_page__bindgen_ty_1>(), |
2242 | 8usize, |
2243 | concat!("Size of: " , stringify!(perf_event_mmap_page__bindgen_ty_1)) |
2244 | ); |
2245 | assert_eq!( |
2246 | ::std::mem::align_of::<perf_event_mmap_page__bindgen_ty_1>(), |
2247 | 8usize, |
2248 | concat!( |
2249 | "Alignment of " , |
2250 | stringify!(perf_event_mmap_page__bindgen_ty_1) |
2251 | ) |
2252 | ); |
2253 | assert_eq!( |
2254 | unsafe { |
2255 | &(*(::std::ptr::null::<perf_event_mmap_page__bindgen_ty_1>())).capabilities as *const _ |
2256 | as usize |
2257 | }, |
2258 | 0usize, |
2259 | concat!( |
2260 | "Offset of field: " , |
2261 | stringify!(perf_event_mmap_page__bindgen_ty_1), |
2262 | "::" , |
2263 | stringify!(capabilities) |
2264 | ) |
2265 | ); |
2266 | } |
2267 | impl Default for perf_event_mmap_page__bindgen_ty_1 { |
2268 | fn default() -> Self { |
2269 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
2270 | unsafe { |
2271 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
2272 | s.assume_init() |
2273 | } |
2274 | } |
2275 | } |
2276 | #[test ] |
2277 | fn bindgen_test_layout_perf_event_mmap_page() { |
2278 | assert_eq!( |
2279 | ::std::mem::size_of::<perf_event_mmap_page>(), |
2280 | 1088usize, |
2281 | concat!("Size of: " , stringify!(perf_event_mmap_page)) |
2282 | ); |
2283 | assert_eq!( |
2284 | ::std::mem::align_of::<perf_event_mmap_page>(), |
2285 | 8usize, |
2286 | concat!("Alignment of " , stringify!(perf_event_mmap_page)) |
2287 | ); |
2288 | assert_eq!( |
2289 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).version as *const _ as usize }, |
2290 | 0usize, |
2291 | concat!( |
2292 | "Offset of field: " , |
2293 | stringify!(perf_event_mmap_page), |
2294 | "::" , |
2295 | stringify!(version) |
2296 | ) |
2297 | ); |
2298 | assert_eq!( |
2299 | unsafe { |
2300 | &(*(::std::ptr::null::<perf_event_mmap_page>())).compat_version as *const _ as usize |
2301 | }, |
2302 | 4usize, |
2303 | concat!( |
2304 | "Offset of field: " , |
2305 | stringify!(perf_event_mmap_page), |
2306 | "::" , |
2307 | stringify!(compat_version) |
2308 | ) |
2309 | ); |
2310 | assert_eq!( |
2311 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).lock as *const _ as usize }, |
2312 | 8usize, |
2313 | concat!( |
2314 | "Offset of field: " , |
2315 | stringify!(perf_event_mmap_page), |
2316 | "::" , |
2317 | stringify!(lock) |
2318 | ) |
2319 | ); |
2320 | assert_eq!( |
2321 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).index as *const _ as usize }, |
2322 | 12usize, |
2323 | concat!( |
2324 | "Offset of field: " , |
2325 | stringify!(perf_event_mmap_page), |
2326 | "::" , |
2327 | stringify!(index) |
2328 | ) |
2329 | ); |
2330 | assert_eq!( |
2331 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).offset as *const _ as usize }, |
2332 | 16usize, |
2333 | concat!( |
2334 | "Offset of field: " , |
2335 | stringify!(perf_event_mmap_page), |
2336 | "::" , |
2337 | stringify!(offset) |
2338 | ) |
2339 | ); |
2340 | assert_eq!( |
2341 | unsafe { |
2342 | &(*(::std::ptr::null::<perf_event_mmap_page>())).time_enabled as *const _ as usize |
2343 | }, |
2344 | 24usize, |
2345 | concat!( |
2346 | "Offset of field: " , |
2347 | stringify!(perf_event_mmap_page), |
2348 | "::" , |
2349 | stringify!(time_enabled) |
2350 | ) |
2351 | ); |
2352 | assert_eq!( |
2353 | unsafe { |
2354 | &(*(::std::ptr::null::<perf_event_mmap_page>())).time_running as *const _ as usize |
2355 | }, |
2356 | 32usize, |
2357 | concat!( |
2358 | "Offset of field: " , |
2359 | stringify!(perf_event_mmap_page), |
2360 | "::" , |
2361 | stringify!(time_running) |
2362 | ) |
2363 | ); |
2364 | assert_eq!( |
2365 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).pmc_width as *const _ as usize }, |
2366 | 48usize, |
2367 | concat!( |
2368 | "Offset of field: " , |
2369 | stringify!(perf_event_mmap_page), |
2370 | "::" , |
2371 | stringify!(pmc_width) |
2372 | ) |
2373 | ); |
2374 | assert_eq!( |
2375 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).time_shift as *const _ as usize }, |
2376 | 50usize, |
2377 | concat!( |
2378 | "Offset of field: " , |
2379 | stringify!(perf_event_mmap_page), |
2380 | "::" , |
2381 | stringify!(time_shift) |
2382 | ) |
2383 | ); |
2384 | assert_eq!( |
2385 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).time_mult as *const _ as usize }, |
2386 | 52usize, |
2387 | concat!( |
2388 | "Offset of field: " , |
2389 | stringify!(perf_event_mmap_page), |
2390 | "::" , |
2391 | stringify!(time_mult) |
2392 | ) |
2393 | ); |
2394 | assert_eq!( |
2395 | unsafe { |
2396 | &(*(::std::ptr::null::<perf_event_mmap_page>())).time_offset as *const _ as usize |
2397 | }, |
2398 | 56usize, |
2399 | concat!( |
2400 | "Offset of field: " , |
2401 | stringify!(perf_event_mmap_page), |
2402 | "::" , |
2403 | stringify!(time_offset) |
2404 | ) |
2405 | ); |
2406 | assert_eq!( |
2407 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).time_zero as *const _ as usize }, |
2408 | 64usize, |
2409 | concat!( |
2410 | "Offset of field: " , |
2411 | stringify!(perf_event_mmap_page), |
2412 | "::" , |
2413 | stringify!(time_zero) |
2414 | ) |
2415 | ); |
2416 | assert_eq!( |
2417 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).size as *const _ as usize }, |
2418 | 72usize, |
2419 | concat!( |
2420 | "Offset of field: " , |
2421 | stringify!(perf_event_mmap_page), |
2422 | "::" , |
2423 | stringify!(size) |
2424 | ) |
2425 | ); |
2426 | assert_eq!( |
2427 | unsafe { |
2428 | &(*(::std::ptr::null::<perf_event_mmap_page>())).__reserved_1 as *const _ as usize |
2429 | }, |
2430 | 76usize, |
2431 | concat!( |
2432 | "Offset of field: " , |
2433 | stringify!(perf_event_mmap_page), |
2434 | "::" , |
2435 | stringify!(__reserved_1) |
2436 | ) |
2437 | ); |
2438 | assert_eq!( |
2439 | unsafe { |
2440 | &(*(::std::ptr::null::<perf_event_mmap_page>())).time_cycles as *const _ as usize |
2441 | }, |
2442 | 80usize, |
2443 | concat!( |
2444 | "Offset of field: " , |
2445 | stringify!(perf_event_mmap_page), |
2446 | "::" , |
2447 | stringify!(time_cycles) |
2448 | ) |
2449 | ); |
2450 | assert_eq!( |
2451 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).time_mask as *const _ as usize }, |
2452 | 88usize, |
2453 | concat!( |
2454 | "Offset of field: " , |
2455 | stringify!(perf_event_mmap_page), |
2456 | "::" , |
2457 | stringify!(time_mask) |
2458 | ) |
2459 | ); |
2460 | assert_eq!( |
2461 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).__reserved as *const _ as usize }, |
2462 | 96usize, |
2463 | concat!( |
2464 | "Offset of field: " , |
2465 | stringify!(perf_event_mmap_page), |
2466 | "::" , |
2467 | stringify!(__reserved) |
2468 | ) |
2469 | ); |
2470 | assert_eq!( |
2471 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).data_head as *const _ as usize }, |
2472 | 1024usize, |
2473 | concat!( |
2474 | "Offset of field: " , |
2475 | stringify!(perf_event_mmap_page), |
2476 | "::" , |
2477 | stringify!(data_head) |
2478 | ) |
2479 | ); |
2480 | assert_eq!( |
2481 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).data_tail as *const _ as usize }, |
2482 | 1032usize, |
2483 | concat!( |
2484 | "Offset of field: " , |
2485 | stringify!(perf_event_mmap_page), |
2486 | "::" , |
2487 | stringify!(data_tail) |
2488 | ) |
2489 | ); |
2490 | assert_eq!( |
2491 | unsafe { |
2492 | &(*(::std::ptr::null::<perf_event_mmap_page>())).data_offset as *const _ as usize |
2493 | }, |
2494 | 1040usize, |
2495 | concat!( |
2496 | "Offset of field: " , |
2497 | stringify!(perf_event_mmap_page), |
2498 | "::" , |
2499 | stringify!(data_offset) |
2500 | ) |
2501 | ); |
2502 | assert_eq!( |
2503 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).data_size as *const _ as usize }, |
2504 | 1048usize, |
2505 | concat!( |
2506 | "Offset of field: " , |
2507 | stringify!(perf_event_mmap_page), |
2508 | "::" , |
2509 | stringify!(data_size) |
2510 | ) |
2511 | ); |
2512 | assert_eq!( |
2513 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).aux_head as *const _ as usize }, |
2514 | 1056usize, |
2515 | concat!( |
2516 | "Offset of field: " , |
2517 | stringify!(perf_event_mmap_page), |
2518 | "::" , |
2519 | stringify!(aux_head) |
2520 | ) |
2521 | ); |
2522 | assert_eq!( |
2523 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).aux_tail as *const _ as usize }, |
2524 | 1064usize, |
2525 | concat!( |
2526 | "Offset of field: " , |
2527 | stringify!(perf_event_mmap_page), |
2528 | "::" , |
2529 | stringify!(aux_tail) |
2530 | ) |
2531 | ); |
2532 | assert_eq!( |
2533 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).aux_offset as *const _ as usize }, |
2534 | 1072usize, |
2535 | concat!( |
2536 | "Offset of field: " , |
2537 | stringify!(perf_event_mmap_page), |
2538 | "::" , |
2539 | stringify!(aux_offset) |
2540 | ) |
2541 | ); |
2542 | assert_eq!( |
2543 | unsafe { &(*(::std::ptr::null::<perf_event_mmap_page>())).aux_size as *const _ as usize }, |
2544 | 1080usize, |
2545 | concat!( |
2546 | "Offset of field: " , |
2547 | stringify!(perf_event_mmap_page), |
2548 | "::" , |
2549 | stringify!(aux_size) |
2550 | ) |
2551 | ); |
2552 | } |
2553 | impl Default for perf_event_mmap_page { |
2554 | fn default() -> Self { |
2555 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
2556 | unsafe { |
2557 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
2558 | s.assume_init() |
2559 | } |
2560 | } |
2561 | } |
2562 | #[repr (C)] |
2563 | #[derive (Debug, Default, Copy, Clone)] |
2564 | pub struct perf_event_header { |
2565 | pub type_: __u32, |
2566 | pub misc: __u16, |
2567 | pub size: __u16, |
2568 | } |
2569 | #[test ] |
2570 | fn bindgen_test_layout_perf_event_header() { |
2571 | assert_eq!( |
2572 | ::std::mem::size_of::<perf_event_header>(), |
2573 | 8usize, |
2574 | concat!("Size of: " , stringify!(perf_event_header)) |
2575 | ); |
2576 | assert_eq!( |
2577 | ::std::mem::align_of::<perf_event_header>(), |
2578 | 4usize, |
2579 | concat!("Alignment of " , stringify!(perf_event_header)) |
2580 | ); |
2581 | assert_eq!( |
2582 | unsafe { &(*(::std::ptr::null::<perf_event_header>())).type_ as *const _ as usize }, |
2583 | 0usize, |
2584 | concat!( |
2585 | "Offset of field: " , |
2586 | stringify!(perf_event_header), |
2587 | "::" , |
2588 | stringify!(type_) |
2589 | ) |
2590 | ); |
2591 | assert_eq!( |
2592 | unsafe { &(*(::std::ptr::null::<perf_event_header>())).misc as *const _ as usize }, |
2593 | 4usize, |
2594 | concat!( |
2595 | "Offset of field: " , |
2596 | stringify!(perf_event_header), |
2597 | "::" , |
2598 | stringify!(misc) |
2599 | ) |
2600 | ); |
2601 | assert_eq!( |
2602 | unsafe { &(*(::std::ptr::null::<perf_event_header>())).size as *const _ as usize }, |
2603 | 6usize, |
2604 | concat!( |
2605 | "Offset of field: " , |
2606 | stringify!(perf_event_header), |
2607 | "::" , |
2608 | stringify!(size) |
2609 | ) |
2610 | ); |
2611 | } |
2612 | #[repr (C)] |
2613 | #[derive (Debug, Default, Copy, Clone)] |
2614 | pub struct perf_ns_link_info { |
2615 | pub dev: __u64, |
2616 | pub ino: __u64, |
2617 | } |
2618 | #[test ] |
2619 | fn bindgen_test_layout_perf_ns_link_info() { |
2620 | assert_eq!( |
2621 | ::std::mem::size_of::<perf_ns_link_info>(), |
2622 | 16usize, |
2623 | concat!("Size of: " , stringify!(perf_ns_link_info)) |
2624 | ); |
2625 | assert_eq!( |
2626 | ::std::mem::align_of::<perf_ns_link_info>(), |
2627 | 8usize, |
2628 | concat!("Alignment of " , stringify!(perf_ns_link_info)) |
2629 | ); |
2630 | assert_eq!( |
2631 | unsafe { &(*(::std::ptr::null::<perf_ns_link_info>())).dev as *const _ as usize }, |
2632 | 0usize, |
2633 | concat!( |
2634 | "Offset of field: " , |
2635 | stringify!(perf_ns_link_info), |
2636 | "::" , |
2637 | stringify!(dev) |
2638 | ) |
2639 | ); |
2640 | assert_eq!( |
2641 | unsafe { &(*(::std::ptr::null::<perf_ns_link_info>())).ino as *const _ as usize }, |
2642 | 8usize, |
2643 | concat!( |
2644 | "Offset of field: " , |
2645 | stringify!(perf_ns_link_info), |
2646 | "::" , |
2647 | stringify!(ino) |
2648 | ) |
2649 | ); |
2650 | } |
2651 | pub const NET_NS_INDEX: ::std::os::raw::c_uint = 0; |
2652 | pub const UTS_NS_INDEX: ::std::os::raw::c_uint = 1; |
2653 | pub const IPC_NS_INDEX: ::std::os::raw::c_uint = 2; |
2654 | pub const PID_NS_INDEX: ::std::os::raw::c_uint = 3; |
2655 | pub const USER_NS_INDEX: ::std::os::raw::c_uint = 4; |
2656 | pub const MNT_NS_INDEX: ::std::os::raw::c_uint = 5; |
2657 | pub const CGROUP_NS_INDEX: ::std::os::raw::c_uint = 6; |
2658 | pub const NR_NAMESPACES: ::std::os::raw::c_uint = 7; |
2659 | pub type _bindgen_ty_3 = ::std::os::raw::c_uint; |
2660 | pub const PERF_RECORD_MMAP: perf_event_type = 1; |
2661 | pub const PERF_RECORD_LOST: perf_event_type = 2; |
2662 | pub const PERF_RECORD_COMM: perf_event_type = 3; |
2663 | pub const PERF_RECORD_EXIT: perf_event_type = 4; |
2664 | pub const PERF_RECORD_THROTTLE: perf_event_type = 5; |
2665 | pub const PERF_RECORD_UNTHROTTLE: perf_event_type = 6; |
2666 | pub const PERF_RECORD_FORK: perf_event_type = 7; |
2667 | pub const PERF_RECORD_READ: perf_event_type = 8; |
2668 | pub const PERF_RECORD_SAMPLE: perf_event_type = 9; |
2669 | pub const PERF_RECORD_MMAP2: perf_event_type = 10; |
2670 | pub const PERF_RECORD_AUX: perf_event_type = 11; |
2671 | pub const PERF_RECORD_ITRACE_START: perf_event_type = 12; |
2672 | pub const PERF_RECORD_LOST_SAMPLES: perf_event_type = 13; |
2673 | pub const PERF_RECORD_SWITCH: perf_event_type = 14; |
2674 | pub const PERF_RECORD_SWITCH_CPU_WIDE: perf_event_type = 15; |
2675 | pub const PERF_RECORD_NAMESPACES: perf_event_type = 16; |
2676 | pub const PERF_RECORD_KSYMBOL: perf_event_type = 17; |
2677 | pub const PERF_RECORD_BPF_EVENT: perf_event_type = 18; |
2678 | pub const PERF_RECORD_CGROUP: perf_event_type = 19; |
2679 | pub const PERF_RECORD_TEXT_POKE: perf_event_type = 20; |
2680 | pub const PERF_RECORD_AUX_OUTPUT_HW_ID: perf_event_type = 21; |
2681 | pub const PERF_RECORD_MAX: perf_event_type = 22; |
2682 | pub type perf_event_type = ::std::os::raw::c_uint; |
2683 | pub const PERF_RECORD_KSYMBOL_TYPE_UNKNOWN: perf_record_ksymbol_type = 0; |
2684 | pub const PERF_RECORD_KSYMBOL_TYPE_BPF: perf_record_ksymbol_type = 1; |
2685 | pub const PERF_RECORD_KSYMBOL_TYPE_OOL: perf_record_ksymbol_type = 2; |
2686 | pub const PERF_RECORD_KSYMBOL_TYPE_MAX: perf_record_ksymbol_type = 3; |
2687 | pub type perf_record_ksymbol_type = ::std::os::raw::c_uint; |
2688 | pub const PERF_BPF_EVENT_UNKNOWN: perf_bpf_event_type = 0; |
2689 | pub const PERF_BPF_EVENT_PROG_LOAD: perf_bpf_event_type = 1; |
2690 | pub const PERF_BPF_EVENT_PROG_UNLOAD: perf_bpf_event_type = 2; |
2691 | pub const PERF_BPF_EVENT_MAX: perf_bpf_event_type = 3; |
2692 | pub type perf_bpf_event_type = ::std::os::raw::c_uint; |
2693 | pub const PERF_CONTEXT_HV: perf_callchain_context = 18446744073709551584; |
2694 | pub const PERF_CONTEXT_KERNEL: perf_callchain_context = 18446744073709551488; |
2695 | pub const PERF_CONTEXT_USER: perf_callchain_context = 18446744073709551104; |
2696 | pub const PERF_CONTEXT_GUEST: perf_callchain_context = 18446744073709549568; |
2697 | pub const PERF_CONTEXT_GUEST_KERNEL: perf_callchain_context = 18446744073709549440; |
2698 | pub const PERF_CONTEXT_GUEST_USER: perf_callchain_context = 18446744073709549056; |
2699 | pub const PERF_CONTEXT_MAX: perf_callchain_context = 18446744073709547521; |
2700 | pub type perf_callchain_context = ::std::os::raw::c_ulong; |
2701 | #[repr (C)] |
2702 | #[derive (Copy, Clone)] |
2703 | pub union perf_mem_data_src { |
2704 | pub val: __u64, |
2705 | pub __bindgen_anon_1: perf_mem_data_src__bindgen_ty_1, |
2706 | } |
2707 | #[repr (C)] |
2708 | #[repr (align(8))] |
2709 | #[derive (Debug, Default, Copy, Clone)] |
2710 | pub struct perf_mem_data_src__bindgen_ty_1 { |
2711 | pub _bitfield_align_1: [u32; 0], |
2712 | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, |
2713 | } |
2714 | #[test ] |
2715 | fn bindgen_test_layout_perf_mem_data_src__bindgen_ty_1() { |
2716 | assert_eq!( |
2717 | ::std::mem::size_of::<perf_mem_data_src__bindgen_ty_1>(), |
2718 | 8usize, |
2719 | concat!("Size of: " , stringify!(perf_mem_data_src__bindgen_ty_1)) |
2720 | ); |
2721 | assert_eq!( |
2722 | ::std::mem::align_of::<perf_mem_data_src__bindgen_ty_1>(), |
2723 | 8usize, |
2724 | concat!("Alignment of " , stringify!(perf_mem_data_src__bindgen_ty_1)) |
2725 | ); |
2726 | } |
2727 | impl perf_mem_data_src__bindgen_ty_1 { |
2728 | #[inline ] |
2729 | pub fn mem_op(&self) -> __u64 { |
2730 | unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u64) } |
2731 | } |
2732 | #[inline ] |
2733 | pub fn set_mem_op(&mut self, val: __u64) { |
2734 | unsafe { |
2735 | let val: u64 = ::std::mem::transmute(val); |
2736 | self._bitfield_1.set(0usize, 5u8, val as u64) |
2737 | } |
2738 | } |
2739 | #[inline ] |
2740 | pub fn mem_lvl(&self) -> __u64 { |
2741 | unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 14u8) as u64) } |
2742 | } |
2743 | #[inline ] |
2744 | pub fn set_mem_lvl(&mut self, val: __u64) { |
2745 | unsafe { |
2746 | let val: u64 = ::std::mem::transmute(val); |
2747 | self._bitfield_1.set(5usize, 14u8, val as u64) |
2748 | } |
2749 | } |
2750 | #[inline ] |
2751 | pub fn mem_snoop(&self) -> __u64 { |
2752 | unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 5u8) as u64) } |
2753 | } |
2754 | #[inline ] |
2755 | pub fn set_mem_snoop(&mut self, val: __u64) { |
2756 | unsafe { |
2757 | let val: u64 = ::std::mem::transmute(val); |
2758 | self._bitfield_1.set(19usize, 5u8, val as u64) |
2759 | } |
2760 | } |
2761 | #[inline ] |
2762 | pub fn mem_lock(&self) -> __u64 { |
2763 | unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u64) } |
2764 | } |
2765 | #[inline ] |
2766 | pub fn set_mem_lock(&mut self, val: __u64) { |
2767 | unsafe { |
2768 | let val: u64 = ::std::mem::transmute(val); |
2769 | self._bitfield_1.set(24usize, 2u8, val as u64) |
2770 | } |
2771 | } |
2772 | #[inline ] |
2773 | pub fn mem_dtlb(&self) -> __u64 { |
2774 | unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 7u8) as u64) } |
2775 | } |
2776 | #[inline ] |
2777 | pub fn set_mem_dtlb(&mut self, val: __u64) { |
2778 | unsafe { |
2779 | let val: u64 = ::std::mem::transmute(val); |
2780 | self._bitfield_1.set(26usize, 7u8, val as u64) |
2781 | } |
2782 | } |
2783 | #[inline ] |
2784 | pub fn mem_lvl_num(&self) -> __u64 { |
2785 | unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 4u8) as u64) } |
2786 | } |
2787 | #[inline ] |
2788 | pub fn set_mem_lvl_num(&mut self, val: __u64) { |
2789 | unsafe { |
2790 | let val: u64 = ::std::mem::transmute(val); |
2791 | self._bitfield_1.set(33usize, 4u8, val as u64) |
2792 | } |
2793 | } |
2794 | #[inline ] |
2795 | pub fn mem_remote(&self) -> __u64 { |
2796 | unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } |
2797 | } |
2798 | #[inline ] |
2799 | pub fn set_mem_remote(&mut self, val: __u64) { |
2800 | unsafe { |
2801 | let val: u64 = ::std::mem::transmute(val); |
2802 | self._bitfield_1.set(37usize, 1u8, val as u64) |
2803 | } |
2804 | } |
2805 | #[inline ] |
2806 | pub fn mem_snoopx(&self) -> __u64 { |
2807 | unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 2u8) as u64) } |
2808 | } |
2809 | #[inline ] |
2810 | pub fn set_mem_snoopx(&mut self, val: __u64) { |
2811 | unsafe { |
2812 | let val: u64 = ::std::mem::transmute(val); |
2813 | self._bitfield_1.set(38usize, 2u8, val as u64) |
2814 | } |
2815 | } |
2816 | #[inline ] |
2817 | pub fn mem_blk(&self) -> __u64 { |
2818 | unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 3u8) as u64) } |
2819 | } |
2820 | #[inline ] |
2821 | pub fn set_mem_blk(&mut self, val: __u64) { |
2822 | unsafe { |
2823 | let val: u64 = ::std::mem::transmute(val); |
2824 | self._bitfield_1.set(40usize, 3u8, val as u64) |
2825 | } |
2826 | } |
2827 | #[inline ] |
2828 | pub fn mem_hops(&self) -> __u64 { |
2829 | unsafe { ::std::mem::transmute(self._bitfield_1.get(43usize, 3u8) as u64) } |
2830 | } |
2831 | #[inline ] |
2832 | pub fn set_mem_hops(&mut self, val: __u64) { |
2833 | unsafe { |
2834 | let val: u64 = ::std::mem::transmute(val); |
2835 | self._bitfield_1.set(43usize, 3u8, val as u64) |
2836 | } |
2837 | } |
2838 | #[inline ] |
2839 | pub fn mem_rsvd(&self) -> __u64 { |
2840 | unsafe { ::std::mem::transmute(self._bitfield_1.get(46usize, 18u8) as u64) } |
2841 | } |
2842 | #[inline ] |
2843 | pub fn set_mem_rsvd(&mut self, val: __u64) { |
2844 | unsafe { |
2845 | let val: u64 = ::std::mem::transmute(val); |
2846 | self._bitfield_1.set(46usize, 18u8, val as u64) |
2847 | } |
2848 | } |
2849 | #[inline ] |
2850 | pub fn new_bitfield_1( |
2851 | mem_op: __u64, |
2852 | mem_lvl: __u64, |
2853 | mem_snoop: __u64, |
2854 | mem_lock: __u64, |
2855 | mem_dtlb: __u64, |
2856 | mem_lvl_num: __u64, |
2857 | mem_remote: __u64, |
2858 | mem_snoopx: __u64, |
2859 | mem_blk: __u64, |
2860 | mem_hops: __u64, |
2861 | mem_rsvd: __u64, |
2862 | ) -> __BindgenBitfieldUnit<[u8; 8usize]> { |
2863 | let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); |
2864 | __bindgen_bitfield_unit.set(0usize, 5u8, { |
2865 | let mem_op: u64 = unsafe { ::std::mem::transmute(mem_op) }; |
2866 | mem_op as u64 |
2867 | }); |
2868 | __bindgen_bitfield_unit.set(5usize, 14u8, { |
2869 | let mem_lvl: u64 = unsafe { ::std::mem::transmute(mem_lvl) }; |
2870 | mem_lvl as u64 |
2871 | }); |
2872 | __bindgen_bitfield_unit.set(19usize, 5u8, { |
2873 | let mem_snoop: u64 = unsafe { ::std::mem::transmute(mem_snoop) }; |
2874 | mem_snoop as u64 |
2875 | }); |
2876 | __bindgen_bitfield_unit.set(24usize, 2u8, { |
2877 | let mem_lock: u64 = unsafe { ::std::mem::transmute(mem_lock) }; |
2878 | mem_lock as u64 |
2879 | }); |
2880 | __bindgen_bitfield_unit.set(26usize, 7u8, { |
2881 | let mem_dtlb: u64 = unsafe { ::std::mem::transmute(mem_dtlb) }; |
2882 | mem_dtlb as u64 |
2883 | }); |
2884 | __bindgen_bitfield_unit.set(33usize, 4u8, { |
2885 | let mem_lvl_num: u64 = unsafe { ::std::mem::transmute(mem_lvl_num) }; |
2886 | mem_lvl_num as u64 |
2887 | }); |
2888 | __bindgen_bitfield_unit.set(37usize, 1u8, { |
2889 | let mem_remote: u64 = unsafe { ::std::mem::transmute(mem_remote) }; |
2890 | mem_remote as u64 |
2891 | }); |
2892 | __bindgen_bitfield_unit.set(38usize, 2u8, { |
2893 | let mem_snoopx: u64 = unsafe { ::std::mem::transmute(mem_snoopx) }; |
2894 | mem_snoopx as u64 |
2895 | }); |
2896 | __bindgen_bitfield_unit.set(40usize, 3u8, { |
2897 | let mem_blk: u64 = unsafe { ::std::mem::transmute(mem_blk) }; |
2898 | mem_blk as u64 |
2899 | }); |
2900 | __bindgen_bitfield_unit.set(43usize, 3u8, { |
2901 | let mem_hops: u64 = unsafe { ::std::mem::transmute(mem_hops) }; |
2902 | mem_hops as u64 |
2903 | }); |
2904 | __bindgen_bitfield_unit.set(46usize, 18u8, { |
2905 | let mem_rsvd: u64 = unsafe { ::std::mem::transmute(mem_rsvd) }; |
2906 | mem_rsvd as u64 |
2907 | }); |
2908 | __bindgen_bitfield_unit |
2909 | } |
2910 | } |
2911 | #[test ] |
2912 | fn bindgen_test_layout_perf_mem_data_src() { |
2913 | assert_eq!( |
2914 | ::std::mem::size_of::<perf_mem_data_src>(), |
2915 | 8usize, |
2916 | concat!("Size of: " , stringify!(perf_mem_data_src)) |
2917 | ); |
2918 | assert_eq!( |
2919 | ::std::mem::align_of::<perf_mem_data_src>(), |
2920 | 8usize, |
2921 | concat!("Alignment of " , stringify!(perf_mem_data_src)) |
2922 | ); |
2923 | assert_eq!( |
2924 | unsafe { &(*(::std::ptr::null::<perf_mem_data_src>())).val as *const _ as usize }, |
2925 | 0usize, |
2926 | concat!( |
2927 | "Offset of field: " , |
2928 | stringify!(perf_mem_data_src), |
2929 | "::" , |
2930 | stringify!(val) |
2931 | ) |
2932 | ); |
2933 | } |
2934 | impl Default for perf_mem_data_src { |
2935 | fn default() -> Self { |
2936 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
2937 | unsafe { |
2938 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
2939 | s.assume_init() |
2940 | } |
2941 | } |
2942 | } |
2943 | #[repr (C)] |
2944 | #[derive (Debug, Default, Copy, Clone)] |
2945 | pub struct perf_branch_entry { |
2946 | pub from: __u64, |
2947 | pub to: __u64, |
2948 | pub _bitfield_align_1: [u64; 0], |
2949 | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, |
2950 | } |
2951 | #[test ] |
2952 | fn bindgen_test_layout_perf_branch_entry() { |
2953 | assert_eq!( |
2954 | ::std::mem::size_of::<perf_branch_entry>(), |
2955 | 24usize, |
2956 | concat!("Size of: " , stringify!(perf_branch_entry)) |
2957 | ); |
2958 | assert_eq!( |
2959 | ::std::mem::align_of::<perf_branch_entry>(), |
2960 | 8usize, |
2961 | concat!("Alignment of " , stringify!(perf_branch_entry)) |
2962 | ); |
2963 | assert_eq!( |
2964 | unsafe { &(*(::std::ptr::null::<perf_branch_entry>())).from as *const _ as usize }, |
2965 | 0usize, |
2966 | concat!( |
2967 | "Offset of field: " , |
2968 | stringify!(perf_branch_entry), |
2969 | "::" , |
2970 | stringify!(from) |
2971 | ) |
2972 | ); |
2973 | assert_eq!( |
2974 | unsafe { &(*(::std::ptr::null::<perf_branch_entry>())).to as *const _ as usize }, |
2975 | 8usize, |
2976 | concat!( |
2977 | "Offset of field: " , |
2978 | stringify!(perf_branch_entry), |
2979 | "::" , |
2980 | stringify!(to) |
2981 | ) |
2982 | ); |
2983 | } |
2984 | impl perf_branch_entry { |
2985 | #[inline ] |
2986 | pub fn mispred(&self) -> __u64 { |
2987 | unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } |
2988 | } |
2989 | #[inline ] |
2990 | pub fn set_mispred(&mut self, val: __u64) { |
2991 | unsafe { |
2992 | let val: u64 = ::std::mem::transmute(val); |
2993 | self._bitfield_1.set(0usize, 1u8, val as u64) |
2994 | } |
2995 | } |
2996 | #[inline ] |
2997 | pub fn predicted(&self) -> __u64 { |
2998 | unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } |
2999 | } |
3000 | #[inline ] |
3001 | pub fn set_predicted(&mut self, val: __u64) { |
3002 | unsafe { |
3003 | let val: u64 = ::std::mem::transmute(val); |
3004 | self._bitfield_1.set(1usize, 1u8, val as u64) |
3005 | } |
3006 | } |
3007 | #[inline ] |
3008 | pub fn in_tx(&self) -> __u64 { |
3009 | unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } |
3010 | } |
3011 | #[inline ] |
3012 | pub fn set_in_tx(&mut self, val: __u64) { |
3013 | unsafe { |
3014 | let val: u64 = ::std::mem::transmute(val); |
3015 | self._bitfield_1.set(2usize, 1u8, val as u64) |
3016 | } |
3017 | } |
3018 | #[inline ] |
3019 | pub fn abort(&self) -> __u64 { |
3020 | unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } |
3021 | } |
3022 | #[inline ] |
3023 | pub fn set_abort(&mut self, val: __u64) { |
3024 | unsafe { |
3025 | let val: u64 = ::std::mem::transmute(val); |
3026 | self._bitfield_1.set(3usize, 1u8, val as u64) |
3027 | } |
3028 | } |
3029 | #[inline ] |
3030 | pub fn cycles(&self) -> __u64 { |
3031 | unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 16u8) as u64) } |
3032 | } |
3033 | #[inline ] |
3034 | pub fn set_cycles(&mut self, val: __u64) { |
3035 | unsafe { |
3036 | let val: u64 = ::std::mem::transmute(val); |
3037 | self._bitfield_1.set(4usize, 16u8, val as u64) |
3038 | } |
3039 | } |
3040 | #[inline ] |
3041 | pub fn type_(&self) -> __u64 { |
3042 | unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u64) } |
3043 | } |
3044 | #[inline ] |
3045 | pub fn set_type(&mut self, val: __u64) { |
3046 | unsafe { |
3047 | let val: u64 = ::std::mem::transmute(val); |
3048 | self._bitfield_1.set(20usize, 4u8, val as u64) |
3049 | } |
3050 | } |
3051 | #[inline ] |
3052 | pub fn reserved(&self) -> __u64 { |
3053 | unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 40u8) as u64) } |
3054 | } |
3055 | #[inline ] |
3056 | pub fn set_reserved(&mut self, val: __u64) { |
3057 | unsafe { |
3058 | let val: u64 = ::std::mem::transmute(val); |
3059 | self._bitfield_1.set(24usize, 40u8, val as u64) |
3060 | } |
3061 | } |
3062 | #[inline ] |
3063 | pub fn new_bitfield_1( |
3064 | mispred: __u64, |
3065 | predicted: __u64, |
3066 | in_tx: __u64, |
3067 | abort: __u64, |
3068 | cycles: __u64, |
3069 | type_: __u64, |
3070 | reserved: __u64, |
3071 | ) -> __BindgenBitfieldUnit<[u8; 8usize]> { |
3072 | let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); |
3073 | __bindgen_bitfield_unit.set(0usize, 1u8, { |
3074 | let mispred: u64 = unsafe { ::std::mem::transmute(mispred) }; |
3075 | mispred as u64 |
3076 | }); |
3077 | __bindgen_bitfield_unit.set(1usize, 1u8, { |
3078 | let predicted: u64 = unsafe { ::std::mem::transmute(predicted) }; |
3079 | predicted as u64 |
3080 | }); |
3081 | __bindgen_bitfield_unit.set(2usize, 1u8, { |
3082 | let in_tx: u64 = unsafe { ::std::mem::transmute(in_tx) }; |
3083 | in_tx as u64 |
3084 | }); |
3085 | __bindgen_bitfield_unit.set(3usize, 1u8, { |
3086 | let abort: u64 = unsafe { ::std::mem::transmute(abort) }; |
3087 | abort as u64 |
3088 | }); |
3089 | __bindgen_bitfield_unit.set(4usize, 16u8, { |
3090 | let cycles: u64 = unsafe { ::std::mem::transmute(cycles) }; |
3091 | cycles as u64 |
3092 | }); |
3093 | __bindgen_bitfield_unit.set(20usize, 4u8, { |
3094 | let type_: u64 = unsafe { ::std::mem::transmute(type_) }; |
3095 | type_ as u64 |
3096 | }); |
3097 | __bindgen_bitfield_unit.set(24usize, 40u8, { |
3098 | let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; |
3099 | reserved as u64 |
3100 | }); |
3101 | __bindgen_bitfield_unit |
3102 | } |
3103 | } |
3104 | #[repr (C)] |
3105 | #[derive (Copy, Clone)] |
3106 | pub union perf_sample_weight { |
3107 | pub full: __u64, |
3108 | pub __bindgen_anon_1: perf_sample_weight__bindgen_ty_1, |
3109 | } |
3110 | #[repr (C)] |
3111 | #[derive (Debug, Default, Copy, Clone)] |
3112 | pub struct perf_sample_weight__bindgen_ty_1 { |
3113 | pub var1_dw: __u32, |
3114 | pub var2_w: __u16, |
3115 | pub var3_w: __u16, |
3116 | } |
3117 | #[test ] |
3118 | fn bindgen_test_layout_perf_sample_weight__bindgen_ty_1() { |
3119 | assert_eq!( |
3120 | ::std::mem::size_of::<perf_sample_weight__bindgen_ty_1>(), |
3121 | 8usize, |
3122 | concat!("Size of: " , stringify!(perf_sample_weight__bindgen_ty_1)) |
3123 | ); |
3124 | assert_eq!( |
3125 | ::std::mem::align_of::<perf_sample_weight__bindgen_ty_1>(), |
3126 | 4usize, |
3127 | concat!( |
3128 | "Alignment of " , |
3129 | stringify!(perf_sample_weight__bindgen_ty_1) |
3130 | ) |
3131 | ); |
3132 | assert_eq!( |
3133 | unsafe { |
3134 | &(*(::std::ptr::null::<perf_sample_weight__bindgen_ty_1>())).var1_dw as *const _ |
3135 | as usize |
3136 | }, |
3137 | 0usize, |
3138 | concat!( |
3139 | "Offset of field: " , |
3140 | stringify!(perf_sample_weight__bindgen_ty_1), |
3141 | "::" , |
3142 | stringify!(var1_dw) |
3143 | ) |
3144 | ); |
3145 | assert_eq!( |
3146 | unsafe { |
3147 | &(*(::std::ptr::null::<perf_sample_weight__bindgen_ty_1>())).var2_w as *const _ as usize |
3148 | }, |
3149 | 4usize, |
3150 | concat!( |
3151 | "Offset of field: " , |
3152 | stringify!(perf_sample_weight__bindgen_ty_1), |
3153 | "::" , |
3154 | stringify!(var2_w) |
3155 | ) |
3156 | ); |
3157 | assert_eq!( |
3158 | unsafe { |
3159 | &(*(::std::ptr::null::<perf_sample_weight__bindgen_ty_1>())).var3_w as *const _ as usize |
3160 | }, |
3161 | 6usize, |
3162 | concat!( |
3163 | "Offset of field: " , |
3164 | stringify!(perf_sample_weight__bindgen_ty_1), |
3165 | "::" , |
3166 | stringify!(var3_w) |
3167 | ) |
3168 | ); |
3169 | } |
3170 | #[test ] |
3171 | fn bindgen_test_layout_perf_sample_weight() { |
3172 | assert_eq!( |
3173 | ::std::mem::size_of::<perf_sample_weight>(), |
3174 | 8usize, |
3175 | concat!("Size of: " , stringify!(perf_sample_weight)) |
3176 | ); |
3177 | assert_eq!( |
3178 | ::std::mem::align_of::<perf_sample_weight>(), |
3179 | 8usize, |
3180 | concat!("Alignment of " , stringify!(perf_sample_weight)) |
3181 | ); |
3182 | assert_eq!( |
3183 | unsafe { &(*(::std::ptr::null::<perf_sample_weight>())).full as *const _ as usize }, |
3184 | 0usize, |
3185 | concat!( |
3186 | "Offset of field: " , |
3187 | stringify!(perf_sample_weight), |
3188 | "::" , |
3189 | stringify!(full) |
3190 | ) |
3191 | ); |
3192 | } |
3193 | impl Default for perf_sample_weight { |
3194 | fn default() -> Self { |
3195 | let mut s: MaybeUninit = ::std::mem::MaybeUninit::<Self>::uninit(); |
3196 | unsafe { |
3197 | ::std::ptr::write_bytes(dst:s.as_mut_ptr(), val:0, count:1); |
3198 | s.assume_init() |
3199 | } |
3200 | } |
3201 | } |
3202 | pub const HW_BREAKPOINT_LEN_1: ::std::os::raw::c_uint = 1; |
3203 | pub const HW_BREAKPOINT_LEN_2: ::std::os::raw::c_uint = 2; |
3204 | pub const HW_BREAKPOINT_LEN_3: ::std::os::raw::c_uint = 3; |
3205 | pub const HW_BREAKPOINT_LEN_4: ::std::os::raw::c_uint = 4; |
3206 | pub const HW_BREAKPOINT_LEN_5: ::std::os::raw::c_uint = 5; |
3207 | pub const HW_BREAKPOINT_LEN_6: ::std::os::raw::c_uint = 6; |
3208 | pub const HW_BREAKPOINT_LEN_7: ::std::os::raw::c_uint = 7; |
3209 | pub const HW_BREAKPOINT_LEN_8: ::std::os::raw::c_uint = 8; |
3210 | pub type _bindgen_ty_4 = ::std::os::raw::c_uint; |
3211 | pub const HW_BREAKPOINT_EMPTY: ::std::os::raw::c_uint = 0; |
3212 | pub const HW_BREAKPOINT_R: ::std::os::raw::c_uint = 1; |
3213 | pub const HW_BREAKPOINT_W: ::std::os::raw::c_uint = 2; |
3214 | pub const HW_BREAKPOINT_RW: ::std::os::raw::c_uint = 3; |
3215 | pub const HW_BREAKPOINT_X: ::std::os::raw::c_uint = 4; |
3216 | pub const HW_BREAKPOINT_INVALID: ::std::os::raw::c_uint = 7; |
3217 | pub type _bindgen_ty_5 = ::std::os::raw::c_uint; |
3218 | pub const TYPE_INST: bp_type_idx = 0; |
3219 | pub const TYPE_DATA: bp_type_idx = 1; |
3220 | pub const TYPE_MAX: bp_type_idx = 2; |
3221 | pub type bp_type_idx = ::std::os::raw::c_uint; |
3222 | pub const ENABLE: perf_event_ioctls = 9216; |
3223 | pub const DISABLE: perf_event_ioctls = 9217; |
3224 | pub const REFRESH: perf_event_ioctls = 9218; |
3225 | pub const RESET: perf_event_ioctls = 9219; |
3226 | pub const PERIOD: perf_event_ioctls = 1074275332; |
3227 | pub const SET_OUTPUT: perf_event_ioctls = 9221; |
3228 | pub const SET_FILTER: perf_event_ioctls = 1074275334; |
3229 | pub const ID: perf_event_ioctls = 2148017159; |
3230 | pub const SET_BPF: perf_event_ioctls = 1074013192; |
3231 | pub const PAUSE_OUTPUT: perf_event_ioctls = 1074013193; |
3232 | pub const QUERY_BPF: perf_event_ioctls = 3221758986; |
3233 | pub const MODIFY_ATTRIBUTES: perf_event_ioctls = 1074275339; |
3234 | pub type perf_event_ioctls = ::std::os::raw::c_uint; |
3235 | |