@@ -9091,6 +9091,15 @@ pub const perf_event_attr = extern struct {
9091
9091
__reserved_2 : u16 = 0 ,
9092
9092
};
9093
9093
9094
+ pub const perf_event_header = extern struct {
9095
+ /// Event type: sample/mmap/fork/etc.
9096
+ type : u32 = 0 ,
9097
+ /// Additional informations on the event: kernel/user/hypervisor/etc.
9098
+ miscs : u16 = 0 ,
9099
+ /// Size of the following record
9100
+ size : u16 = 0 ,
9101
+ };
9102
+
9094
9103
pub const PERF = struct {
9095
9104
pub const TYPE = enum (u32 ) {
9096
9105
HARDWARE ,
@@ -9203,6 +9212,50 @@ pub const PERF = struct {
9203
9212
};
9204
9213
};
9205
9214
9215
+ pub const RECORD = struct {
9216
+ pub const MMAP = 1 ;
9217
+ pub const LOST = 2 ;
9218
+ pub const COMM = 3 ;
9219
+ pub const EXIT = 4 ;
9220
+ pub const THROTTLE = 5 ;
9221
+ pub const UNTHROTTLE = 6 ;
9222
+ pub const FORK = 7 ;
9223
+ pub const READ = 8 ;
9224
+ pub const SAMPLE = 9 ;
9225
+ pub const MMAP2 = 10 ;
9226
+ pub const AUX = 11 ;
9227
+ pub const ITRACE_START = 12 ;
9228
+ pub const LOST_SAMPLES = 13 ;
9229
+ pub const SWITCH = 14 ;
9230
+ pub const SWITCH_CPU_WIDE = 15 ;
9231
+ pub const NAMESPACES = 16 ;
9232
+ pub const KSYMBOL = 17 ;
9233
+ pub const BPF_EVENT = 18 ;
9234
+ pub const CGROUP = 19 ;
9235
+ pub const TEXT_POKE = 20 ;
9236
+ pub const AUX_OUTPUT_HW_ID = 21 ;
9237
+ pub const MAX = 22 ;
9238
+
9239
+ pub const MISC = struct {
9240
+ pub const CPUMODE_MASK = 7 << 0 ;
9241
+ pub const CPUMODE_UNKNOWN = 0 << 0 ;
9242
+ pub const KERNEL = 1 << 0 ;
9243
+ pub const USER = 2 << 0 ;
9244
+ pub const HYPERVISOR = 3 << 0 ;
9245
+ pub const GUEST_KERNEL = 4 << 0 ;
9246
+ pub const GUEST_USER = 5 << 0 ;
9247
+ pub const PROC_MAP_PARSE_TIMEOUT = 1 << 12 ;
9248
+ pub const MMAP_DATA = 1 << 13 ;
9249
+ pub const COMM_EXEC = 1 << 13 ;
9250
+ pub const FORK_EXEC = 1 << 13 ;
9251
+ pub const SWITCH_OUT = 1 << 13 ;
9252
+ pub const EXACT_IP = 1 << 14 ;
9253
+ pub const SWITCH_OUT_PREEMPT = 1 << 14 ;
9254
+ pub const MMAP_BUILD_ID = 1 << 14 ;
9255
+ pub const EXT_RESERVED = 1 << 15 ;
9256
+ };
9257
+ };
9258
+
9206
9259
pub const FLAG = struct {
9207
9260
pub const FD_NO_GROUP = 1 << 0 ;
9208
9261
pub const FD_OUTPUT = 1 << 1 ;
0 commit comments