aya: run xtask codegen aya

perf-event
Alessandro Decina 3 years ago
parent c39dff6025
commit b0a05e759e

@ -1,22 +1,8 @@
/* automatically generated by rust-bindgen 0.57.0 */
/* automatically generated by rust-bindgen 0.59.1 */
pub type __u8 = ::std::os::raw::c_uchar;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __u32 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btf_ext_header {
pub magic: __u16,
pub version: __u8,
pub flags: __u8,
pub hdr_len: __u32,
pub func_info_off: __u32,
pub func_info_len: __u32,
pub line_info_off: __u32,
pub line_info_len: __u32,
pub core_relo_off: __u32,
pub core_relo_len: __u32,
}
pub mod bpf_core_relo_kind {
pub type Type = ::std::os::raw::c_uint;
pub const BPF_FIELD_BYTE_OFFSET: Type = 0;
@ -40,3 +26,17 @@ pub struct bpf_core_relo {
pub access_str_off: __u32,
pub kind: bpf_core_relo_kind::Type,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btf_ext_header {
pub magic: __u16,
pub version: __u8,
pub flags: __u8,
pub hdr_len: __u32,
pub func_info_off: __u32,
pub func_info_len: __u32,
pub line_info_off: __u32,
pub line_info_len: __u32,
pub core_relo_off: __u32,
pub core_relo_len: __u32,
}

@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.57.0 */
/* automatically generated by rust-bindgen 0.59.1 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@ -358,7 +358,8 @@ pub enum bpf_attach_type {
BPF_SK_SKB_VERDICT = 38,
BPF_SK_REUSEPORT_SELECT = 39,
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
__MAX_BPF_ATTACH_TYPE = 41,
BPF_PERF_EVENT = 41,
__MAX_BPF_ATTACH_TYPE = 42,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -382,7 +383,6 @@ pub union bpf_attr {
pub enable_stats: bpf_attr__bindgen_ty_17,
pub iter_create: bpf_attr__bindgen_ty_18,
pub prog_bind_map: bpf_attr__bindgen_ty_19,
_bindgen_union_align: [u64; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -414,7 +414,6 @@ pub struct bpf_attr__bindgen_ty_2 {
pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
pub value: __u64,
pub next_key: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -461,7 +460,6 @@ pub struct bpf_attr__bindgen_ty_4 {
pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
pub attach_prog_fd: __u32,
pub attach_btf_obj_fd: __u32,
_bindgen_union_align: u32,
}
impl bpf_attr__bindgen_ty_4 {
#[inline]
@ -519,7 +517,6 @@ pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
pub map_id: __u32,
pub btf_id: __u32,
pub link_id: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -580,14 +577,13 @@ pub struct bpf_attr__bindgen_ty_14 {
pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
pub target_fd: __u32,
pub target_ifindex: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1,
_bindgen_union_align: [u64; 2usize],
pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -597,6 +593,11 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
pub bpf_cookie: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32,
pub new_prog_fd: __u32,
@ -712,7 +713,6 @@ pub struct btf_type {
pub union btf_type__bindgen_ty_1 {
pub size: __u32,
pub type_: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -765,6 +765,48 @@ pub enum perf_type_id {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_id {
PERF_COUNT_HW_CPU_CYCLES = 0,
PERF_COUNT_HW_INSTRUCTIONS = 1,
PERF_COUNT_HW_CACHE_REFERENCES = 2,
PERF_COUNT_HW_CACHE_MISSES = 3,
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
PERF_COUNT_HW_BRANCH_MISSES = 5,
PERF_COUNT_HW_BUS_CYCLES = 6,
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
PERF_COUNT_HW_REF_CPU_CYCLES = 9,
PERF_COUNT_HW_MAX = 10,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_id {
PERF_COUNT_HW_CACHE_L1D = 0,
PERF_COUNT_HW_CACHE_L1I = 1,
PERF_COUNT_HW_CACHE_LL = 2,
PERF_COUNT_HW_CACHE_DTLB = 3,
PERF_COUNT_HW_CACHE_ITLB = 4,
PERF_COUNT_HW_CACHE_BPU = 5,
PERF_COUNT_HW_CACHE_NODE = 6,
PERF_COUNT_HW_CACHE_MAX = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_op_id {
PERF_COUNT_HW_CACHE_OP_READ = 0,
PERF_COUNT_HW_CACHE_OP_WRITE = 1,
PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
PERF_COUNT_HW_CACHE_OP_MAX = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_op_result_id {
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
PERF_COUNT_HW_CACHE_RESULT_MAX = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_sw_ids {
PERF_COUNT_SW_CPU_CLOCK = 0,
PERF_COUNT_SW_TASK_CLOCK = 1,
@ -777,7 +819,8 @@ pub enum perf_sw_ids {
PERF_COUNT_SW_EMULATION_FAULTS = 8,
PERF_COUNT_SW_DUMMY = 9,
PERF_COUNT_SW_BPF_OUTPUT = 10,
PERF_COUNT_SW_MAX = 11,
PERF_COUNT_SW_CGROUP_SWITCHES = 11,
PERF_COUNT_SW_MAX = 12,
}
#[repr(u64)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@ -806,7 +849,8 @@ pub enum perf_event_sample_format {
PERF_SAMPLE_CGROUP = 2097152,
PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
PERF_SAMPLE_MAX = 16777216,
PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
PERF_SAMPLE_MAX = 33554432,
__PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808,
}
#[repr(C)]
@ -834,20 +878,19 @@ pub struct perf_event_attr {
pub __reserved_2: __u16,
pub aux_sample_size: __u32,
pub __reserved_3: __u32,
pub sig_data: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union perf_event_attr__bindgen_ty_1 {
pub sample_period: __u64,
pub sample_freq: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union perf_event_attr__bindgen_ty_2 {
pub wakeup_events: __u32,
pub wakeup_watermark: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -856,7 +899,6 @@ pub union perf_event_attr__bindgen_ty_3 {
pub kprobe_func: __u64,
pub uprobe_path: __u64,
pub config1: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -865,7 +907,6 @@ pub union perf_event_attr__bindgen_ty_4 {
pub kprobe_addr: __u64,
pub probe_offset: __u64,
pub config2: __u64,
_bindgen_union_align: u64,
}
impl perf_event_attr {
#[inline]
@ -1232,14 +1273,58 @@ impl perf_event_attr {
}
}
#[inline]
pub fn build_id(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
}
#[inline]
pub fn set_build_id(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 1u8, val as u64)
}
}
#[inline]
pub fn inherit_thread(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
}
#[inline]
pub fn set_inherit_thread(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub fn remove_on_exec(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
}
#[inline]
pub fn set_remove_on_exec(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub fn sigtrap(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
}
#[inline]
pub fn set_sigtrap(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub fn __reserved_1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 30u8) as u64) }
unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
}
#[inline]
pub fn set___reserved_1(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 30u8, val as u64)
self._bitfield_1.set(38usize, 26u8, val as u64)
}
}
#[inline]
@ -1277,6 +1362,10 @@ impl perf_event_attr {
aux_output: __u64,
cgroup: __u64,
text_poke: __u64,
build_id: __u64,
inherit_thread: __u64,
remove_on_exec: __u64,
sigtrap: __u64,
__reserved_1: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1414,7 +1503,23 @@ impl perf_event_attr {
let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
text_poke as u64
});
__bindgen_bitfield_unit.set(34usize, 30u8, {
__bindgen_bitfield_unit.set(34usize, 1u8, {
let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
build_id as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
inherit_thread as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
remove_on_exec as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
sigtrap as u64
});
__bindgen_bitfield_unit.set(38usize, 26u8, {
let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
__reserved_1 as u64
});
@ -1456,7 +1561,6 @@ pub struct perf_event_mmap_page {
pub union perf_event_mmap_page__bindgen_ty_1 {
pub capabilities: __u64,
pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[repr(align(8))]
@ -1663,26 +1767,25 @@ pub struct tcmsg {
pub tcm_parent: __u32,
pub tcm_info: __u32,
}
pub const TCA_UNSPEC: _bindgen_ty_94 = _bindgen_ty_94::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_94 = _bindgen_ty_94::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_94 = _bindgen_ty_94::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_94 = _bindgen_ty_94::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_94 = _bindgen_ty_94::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_94 = _bindgen_ty_94::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_94 = _bindgen_ty_94::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_94 = _bindgen_ty_94::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_94 = _bindgen_ty_94::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_94 = _bindgen_ty_94::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_94 = _bindgen_ty_94::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_94 = _bindgen_ty_94::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_94 = _bindgen_ty_94::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_94 = _bindgen_ty_94::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_94 = _bindgen_ty_94::TCA_EGRESS_BLOCK;
pub const TCA_DUMP_FLAGS: _bindgen_ty_94 = _bindgen_ty_94::TCA_DUMP_FLAGS;
pub const __TCA_MAX: _bindgen_ty_94 = _bindgen_ty_94::__TCA_MAX;
pub const TCA_UNSPEC: _bindgen_ty_92 = _bindgen_ty_92::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_92 = _bindgen_ty_92::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_92 = _bindgen_ty_92::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_92 = _bindgen_ty_92::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_92 = _bindgen_ty_92::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_92 = _bindgen_ty_92::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_92 = _bindgen_ty_92::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_92 = _bindgen_ty_92::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_92 = _bindgen_ty_92::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_92 = _bindgen_ty_92::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_92 = _bindgen_ty_92::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_92 = _bindgen_ty_92::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_92 = _bindgen_ty_92::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_92 = _bindgen_ty_92::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_92 = _bindgen_ty_92::TCA_EGRESS_BLOCK;
pub const __TCA_MAX: _bindgen_ty_92 = _bindgen_ty_92::__TCA_MAX;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_94 {
pub enum _bindgen_ty_92 {
TCA_UNSPEC = 0,
TCA_KIND = 1,
TCA_OPTIONS = 2,
@ -1698,25 +1801,24 @@ pub enum _bindgen_ty_94 {
TCA_HW_OFFLOAD = 12,
TCA_INGRESS_BLOCK = 13,
TCA_EGRESS_BLOCK = 14,
TCA_DUMP_FLAGS = 15,
__TCA_MAX = 16,
}
pub const TCA_BPF_UNSPEC: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_151 = _bindgen_ty_151::__TCA_BPF_MAX;
__TCA_MAX = 15,
}
pub const TCA_BPF_UNSPEC: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_148 = _bindgen_ty_148::__TCA_BPF_MAX;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_151 {
pub enum _bindgen_ty_148 {
TCA_BPF_UNSPEC = 0,
TCA_BPF_ACT = 1,
TCA_BPF_POLICE = 2,

@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.57.0 */
/* automatically generated by rust-bindgen 0.59.1 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@ -358,7 +358,8 @@ pub enum bpf_attach_type {
BPF_SK_SKB_VERDICT = 38,
BPF_SK_REUSEPORT_SELECT = 39,
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
__MAX_BPF_ATTACH_TYPE = 41,
BPF_PERF_EVENT = 41,
__MAX_BPF_ATTACH_TYPE = 42,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -382,7 +383,6 @@ pub union bpf_attr {
pub enable_stats: bpf_attr__bindgen_ty_17,
pub iter_create: bpf_attr__bindgen_ty_18,
pub prog_bind_map: bpf_attr__bindgen_ty_19,
_bindgen_union_align: [u64; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -414,7 +414,6 @@ pub struct bpf_attr__bindgen_ty_2 {
pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
pub value: __u64,
pub next_key: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -461,7 +460,6 @@ pub struct bpf_attr__bindgen_ty_4 {
pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
pub attach_prog_fd: __u32,
pub attach_btf_obj_fd: __u32,
_bindgen_union_align: u32,
}
impl bpf_attr__bindgen_ty_4 {
#[inline]
@ -519,7 +517,6 @@ pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
pub map_id: __u32,
pub btf_id: __u32,
pub link_id: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -580,14 +577,13 @@ pub struct bpf_attr__bindgen_ty_14 {
pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
pub target_fd: __u32,
pub target_ifindex: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1,
_bindgen_union_align: [u64; 2usize],
pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -597,6 +593,11 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
pub bpf_cookie: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32,
pub new_prog_fd: __u32,
@ -712,7 +713,6 @@ pub struct btf_type {
pub union btf_type__bindgen_ty_1 {
pub size: __u32,
pub type_: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -765,6 +765,48 @@ pub enum perf_type_id {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_id {
PERF_COUNT_HW_CPU_CYCLES = 0,
PERF_COUNT_HW_INSTRUCTIONS = 1,
PERF_COUNT_HW_CACHE_REFERENCES = 2,
PERF_COUNT_HW_CACHE_MISSES = 3,
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
PERF_COUNT_HW_BRANCH_MISSES = 5,
PERF_COUNT_HW_BUS_CYCLES = 6,
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
PERF_COUNT_HW_REF_CPU_CYCLES = 9,
PERF_COUNT_HW_MAX = 10,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_id {
PERF_COUNT_HW_CACHE_L1D = 0,
PERF_COUNT_HW_CACHE_L1I = 1,
PERF_COUNT_HW_CACHE_LL = 2,
PERF_COUNT_HW_CACHE_DTLB = 3,
PERF_COUNT_HW_CACHE_ITLB = 4,
PERF_COUNT_HW_CACHE_BPU = 5,
PERF_COUNT_HW_CACHE_NODE = 6,
PERF_COUNT_HW_CACHE_MAX = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_op_id {
PERF_COUNT_HW_CACHE_OP_READ = 0,
PERF_COUNT_HW_CACHE_OP_WRITE = 1,
PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
PERF_COUNT_HW_CACHE_OP_MAX = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_op_result_id {
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
PERF_COUNT_HW_CACHE_RESULT_MAX = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_sw_ids {
PERF_COUNT_SW_CPU_CLOCK = 0,
PERF_COUNT_SW_TASK_CLOCK = 1,
@ -777,7 +819,8 @@ pub enum perf_sw_ids {
PERF_COUNT_SW_EMULATION_FAULTS = 8,
PERF_COUNT_SW_DUMMY = 9,
PERF_COUNT_SW_BPF_OUTPUT = 10,
PERF_COUNT_SW_MAX = 11,
PERF_COUNT_SW_CGROUP_SWITCHES = 11,
PERF_COUNT_SW_MAX = 12,
}
#[repr(u64)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@ -806,7 +849,8 @@ pub enum perf_event_sample_format {
PERF_SAMPLE_CGROUP = 2097152,
PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
PERF_SAMPLE_MAX = 16777216,
PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
PERF_SAMPLE_MAX = 33554432,
__PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808,
}
#[repr(C)]
@ -834,20 +878,19 @@ pub struct perf_event_attr {
pub __reserved_2: __u16,
pub aux_sample_size: __u32,
pub __reserved_3: __u32,
pub sig_data: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union perf_event_attr__bindgen_ty_1 {
pub sample_period: __u64,
pub sample_freq: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union perf_event_attr__bindgen_ty_2 {
pub wakeup_events: __u32,
pub wakeup_watermark: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -856,7 +899,6 @@ pub union perf_event_attr__bindgen_ty_3 {
pub kprobe_func: __u64,
pub uprobe_path: __u64,
pub config1: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -865,7 +907,6 @@ pub union perf_event_attr__bindgen_ty_4 {
pub kprobe_addr: __u64,
pub probe_offset: __u64,
pub config2: __u64,
_bindgen_union_align: u64,
}
impl perf_event_attr {
#[inline]
@ -1232,14 +1273,58 @@ impl perf_event_attr {
}
}
#[inline]
pub fn build_id(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
}
#[inline]
pub fn set_build_id(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 1u8, val as u64)
}
}
#[inline]
pub fn inherit_thread(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
}
#[inline]
pub fn set_inherit_thread(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub fn remove_on_exec(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
}
#[inline]
pub fn set_remove_on_exec(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub fn sigtrap(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
}
#[inline]
pub fn set_sigtrap(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub fn __reserved_1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 30u8) as u64) }
unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
}
#[inline]
pub fn set___reserved_1(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 30u8, val as u64)
self._bitfield_1.set(38usize, 26u8, val as u64)
}
}
#[inline]
@ -1277,6 +1362,10 @@ impl perf_event_attr {
aux_output: __u64,
cgroup: __u64,
text_poke: __u64,
build_id: __u64,
inherit_thread: __u64,
remove_on_exec: __u64,
sigtrap: __u64,
__reserved_1: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1414,7 +1503,23 @@ impl perf_event_attr {
let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
text_poke as u64
});
__bindgen_bitfield_unit.set(34usize, 30u8, {
__bindgen_bitfield_unit.set(34usize, 1u8, {
let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
build_id as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
inherit_thread as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
remove_on_exec as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
sigtrap as u64
});
__bindgen_bitfield_unit.set(38usize, 26u8, {
let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
__reserved_1 as u64
});
@ -1456,7 +1561,6 @@ pub struct perf_event_mmap_page {
pub union perf_event_mmap_page__bindgen_ty_1 {
pub capabilities: __u64,
pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[repr(align(8))]
@ -1663,26 +1767,25 @@ pub struct tcmsg {
pub tcm_parent: __u32,
pub tcm_info: __u32,
}
pub const TCA_UNSPEC: _bindgen_ty_94 = _bindgen_ty_94::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_94 = _bindgen_ty_94::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_94 = _bindgen_ty_94::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_94 = _bindgen_ty_94::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_94 = _bindgen_ty_94::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_94 = _bindgen_ty_94::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_94 = _bindgen_ty_94::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_94 = _bindgen_ty_94::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_94 = _bindgen_ty_94::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_94 = _bindgen_ty_94::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_94 = _bindgen_ty_94::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_94 = _bindgen_ty_94::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_94 = _bindgen_ty_94::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_94 = _bindgen_ty_94::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_94 = _bindgen_ty_94::TCA_EGRESS_BLOCK;
pub const TCA_DUMP_FLAGS: _bindgen_ty_94 = _bindgen_ty_94::TCA_DUMP_FLAGS;
pub const __TCA_MAX: _bindgen_ty_94 = _bindgen_ty_94::__TCA_MAX;
pub const TCA_UNSPEC: _bindgen_ty_92 = _bindgen_ty_92::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_92 = _bindgen_ty_92::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_92 = _bindgen_ty_92::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_92 = _bindgen_ty_92::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_92 = _bindgen_ty_92::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_92 = _bindgen_ty_92::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_92 = _bindgen_ty_92::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_92 = _bindgen_ty_92::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_92 = _bindgen_ty_92::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_92 = _bindgen_ty_92::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_92 = _bindgen_ty_92::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_92 = _bindgen_ty_92::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_92 = _bindgen_ty_92::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_92 = _bindgen_ty_92::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_92 = _bindgen_ty_92::TCA_EGRESS_BLOCK;
pub const __TCA_MAX: _bindgen_ty_92 = _bindgen_ty_92::__TCA_MAX;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_94 {
pub enum _bindgen_ty_92 {
TCA_UNSPEC = 0,
TCA_KIND = 1,
TCA_OPTIONS = 2,
@ -1698,25 +1801,24 @@ pub enum _bindgen_ty_94 {
TCA_HW_OFFLOAD = 12,
TCA_INGRESS_BLOCK = 13,
TCA_EGRESS_BLOCK = 14,
TCA_DUMP_FLAGS = 15,
__TCA_MAX = 16,
}
pub const TCA_BPF_UNSPEC: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_151 = _bindgen_ty_151::__TCA_BPF_MAX;
__TCA_MAX = 15,
}
pub const TCA_BPF_UNSPEC: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_148 = _bindgen_ty_148::__TCA_BPF_MAX;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_151 {
pub enum _bindgen_ty_148 {
TCA_BPF_UNSPEC = 0,
TCA_BPF_ACT = 1,
TCA_BPF_POLICE = 2,

@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.57.0 */
/* automatically generated by rust-bindgen 0.59.1 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@ -358,7 +358,8 @@ pub enum bpf_attach_type {
BPF_SK_SKB_VERDICT = 38,
BPF_SK_REUSEPORT_SELECT = 39,
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
__MAX_BPF_ATTACH_TYPE = 41,
BPF_PERF_EVENT = 41,
__MAX_BPF_ATTACH_TYPE = 42,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -382,7 +383,6 @@ pub union bpf_attr {
pub enable_stats: bpf_attr__bindgen_ty_17,
pub iter_create: bpf_attr__bindgen_ty_18,
pub prog_bind_map: bpf_attr__bindgen_ty_19,
_bindgen_union_align: [u64; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -414,7 +414,6 @@ pub struct bpf_attr__bindgen_ty_2 {
pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
pub value: __u64,
pub next_key: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -461,7 +460,6 @@ pub struct bpf_attr__bindgen_ty_4 {
pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
pub attach_prog_fd: __u32,
pub attach_btf_obj_fd: __u32,
_bindgen_union_align: u32,
}
impl bpf_attr__bindgen_ty_4 {
#[inline]
@ -519,7 +517,6 @@ pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
pub map_id: __u32,
pub btf_id: __u32,
pub link_id: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -580,14 +577,13 @@ pub struct bpf_attr__bindgen_ty_14 {
pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
pub target_fd: __u32,
pub target_ifindex: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1,
_bindgen_union_align: [u64; 2usize],
pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -597,6 +593,11 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
pub bpf_cookie: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32,
pub new_prog_fd: __u32,
@ -712,7 +713,6 @@ pub struct btf_type {
pub union btf_type__bindgen_ty_1 {
pub size: __u32,
pub type_: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -765,6 +765,48 @@ pub enum perf_type_id {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_id {
PERF_COUNT_HW_CPU_CYCLES = 0,
PERF_COUNT_HW_INSTRUCTIONS = 1,
PERF_COUNT_HW_CACHE_REFERENCES = 2,
PERF_COUNT_HW_CACHE_MISSES = 3,
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
PERF_COUNT_HW_BRANCH_MISSES = 5,
PERF_COUNT_HW_BUS_CYCLES = 6,
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
PERF_COUNT_HW_REF_CPU_CYCLES = 9,
PERF_COUNT_HW_MAX = 10,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_id {
PERF_COUNT_HW_CACHE_L1D = 0,
PERF_COUNT_HW_CACHE_L1I = 1,
PERF_COUNT_HW_CACHE_LL = 2,
PERF_COUNT_HW_CACHE_DTLB = 3,
PERF_COUNT_HW_CACHE_ITLB = 4,
PERF_COUNT_HW_CACHE_BPU = 5,
PERF_COUNT_HW_CACHE_NODE = 6,
PERF_COUNT_HW_CACHE_MAX = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_op_id {
PERF_COUNT_HW_CACHE_OP_READ = 0,
PERF_COUNT_HW_CACHE_OP_WRITE = 1,
PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
PERF_COUNT_HW_CACHE_OP_MAX = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_hw_cache_op_result_id {
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
PERF_COUNT_HW_CACHE_RESULT_MAX = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum perf_sw_ids {
PERF_COUNT_SW_CPU_CLOCK = 0,
PERF_COUNT_SW_TASK_CLOCK = 1,
@ -777,7 +819,8 @@ pub enum perf_sw_ids {
PERF_COUNT_SW_EMULATION_FAULTS = 8,
PERF_COUNT_SW_DUMMY = 9,
PERF_COUNT_SW_BPF_OUTPUT = 10,
PERF_COUNT_SW_MAX = 11,
PERF_COUNT_SW_CGROUP_SWITCHES = 11,
PERF_COUNT_SW_MAX = 12,
}
#[repr(u64)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@ -806,7 +849,8 @@ pub enum perf_event_sample_format {
PERF_SAMPLE_CGROUP = 2097152,
PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
PERF_SAMPLE_MAX = 16777216,
PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
PERF_SAMPLE_MAX = 33554432,
__PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808,
}
#[repr(C)]
@ -834,20 +878,19 @@ pub struct perf_event_attr {
pub __reserved_2: __u16,
pub aux_sample_size: __u32,
pub __reserved_3: __u32,
pub sig_data: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union perf_event_attr__bindgen_ty_1 {
pub sample_period: __u64,
pub sample_freq: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union perf_event_attr__bindgen_ty_2 {
pub wakeup_events: __u32,
pub wakeup_watermark: __u32,
_bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -856,7 +899,6 @@ pub union perf_event_attr__bindgen_ty_3 {
pub kprobe_func: __u64,
pub uprobe_path: __u64,
pub config1: __u64,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
@ -865,7 +907,6 @@ pub union perf_event_attr__bindgen_ty_4 {
pub kprobe_addr: __u64,
pub probe_offset: __u64,
pub config2: __u64,
_bindgen_union_align: u64,
}
impl perf_event_attr {
#[inline]
@ -1232,14 +1273,58 @@ impl perf_event_attr {
}
}
#[inline]
pub fn build_id(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
}
#[inline]
pub fn set_build_id(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 1u8, val as u64)
}
}
#[inline]
pub fn inherit_thread(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
}
#[inline]
pub fn set_inherit_thread(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub fn remove_on_exec(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
}
#[inline]
pub fn set_remove_on_exec(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub fn sigtrap(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
}
#[inline]
pub fn set_sigtrap(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub fn __reserved_1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 30u8) as u64) }
unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
}
#[inline]
pub fn set___reserved_1(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 30u8, val as u64)
self._bitfield_1.set(38usize, 26u8, val as u64)
}
}
#[inline]
@ -1277,6 +1362,10 @@ impl perf_event_attr {
aux_output: __u64,
cgroup: __u64,
text_poke: __u64,
build_id: __u64,
inherit_thread: __u64,
remove_on_exec: __u64,
sigtrap: __u64,
__reserved_1: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1414,7 +1503,23 @@ impl perf_event_attr {
let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
text_poke as u64
});
__bindgen_bitfield_unit.set(34usize, 30u8, {
__bindgen_bitfield_unit.set(34usize, 1u8, {
let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
build_id as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
inherit_thread as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
remove_on_exec as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
sigtrap as u64
});
__bindgen_bitfield_unit.set(38usize, 26u8, {
let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
__reserved_1 as u64
});
@ -1456,7 +1561,6 @@ pub struct perf_event_mmap_page {
pub union perf_event_mmap_page__bindgen_ty_1 {
pub capabilities: __u64,
pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[repr(align(8))]
@ -1663,26 +1767,25 @@ pub struct tcmsg {
pub tcm_parent: __u32,
pub tcm_info: __u32,
}
pub const TCA_UNSPEC: _bindgen_ty_94 = _bindgen_ty_94::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_94 = _bindgen_ty_94::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_94 = _bindgen_ty_94::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_94 = _bindgen_ty_94::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_94 = _bindgen_ty_94::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_94 = _bindgen_ty_94::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_94 = _bindgen_ty_94::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_94 = _bindgen_ty_94::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_94 = _bindgen_ty_94::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_94 = _bindgen_ty_94::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_94 = _bindgen_ty_94::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_94 = _bindgen_ty_94::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_94 = _bindgen_ty_94::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_94 = _bindgen_ty_94::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_94 = _bindgen_ty_94::TCA_EGRESS_BLOCK;
pub const TCA_DUMP_FLAGS: _bindgen_ty_94 = _bindgen_ty_94::TCA_DUMP_FLAGS;
pub const __TCA_MAX: _bindgen_ty_94 = _bindgen_ty_94::__TCA_MAX;
pub const TCA_UNSPEC: _bindgen_ty_92 = _bindgen_ty_92::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_92 = _bindgen_ty_92::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_92 = _bindgen_ty_92::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_92 = _bindgen_ty_92::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_92 = _bindgen_ty_92::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_92 = _bindgen_ty_92::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_92 = _bindgen_ty_92::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_92 = _bindgen_ty_92::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_92 = _bindgen_ty_92::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_92 = _bindgen_ty_92::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_92 = _bindgen_ty_92::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_92 = _bindgen_ty_92::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_92 = _bindgen_ty_92::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_92 = _bindgen_ty_92::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_92 = _bindgen_ty_92::TCA_EGRESS_BLOCK;
pub const __TCA_MAX: _bindgen_ty_92 = _bindgen_ty_92::__TCA_MAX;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_94 {
pub enum _bindgen_ty_92 {
TCA_UNSPEC = 0,
TCA_KIND = 1,
TCA_OPTIONS = 2,
@ -1698,25 +1801,24 @@ pub enum _bindgen_ty_94 {
TCA_HW_OFFLOAD = 12,
TCA_INGRESS_BLOCK = 13,
TCA_EGRESS_BLOCK = 14,
TCA_DUMP_FLAGS = 15,
__TCA_MAX = 16,
}
pub const TCA_BPF_UNSPEC: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_151 = _bindgen_ty_151::__TCA_BPF_MAX;
__TCA_MAX = 15,
}
pub const TCA_BPF_UNSPEC: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_148 = _bindgen_ty_148::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_148 = _bindgen_ty_148::__TCA_BPF_MAX;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_151 {
pub enum _bindgen_ty_148 {
TCA_BPF_UNSPEC = 0,
TCA_BPF_ACT = 1,
TCA_BPF_POLICE = 2,

Loading…
Cancel
Save