#[repr(C)]pub struct PerfEventAttr {Show 23 fields
pub kind: u32,
pub size: u32,
pub config: u64,
pub sample_period_or_freq: u64,
pub sample_type: u64,
pub read_format: u64,
pub flags: u64,
pub wakeup: u32,
pub bp_type: u32,
pub config1: u64,
pub config2: u64,
pub branch_sample_type: u64,
pub sample_regs_user: u64,
pub sample_stack_user: u32,
pub clockid: i32,
pub sample_regs_intr: u64,
pub aux_watermark: u32,
pub sample_max_stack: u16,
pub reserved_2: u16,
pub aux_sample_size: u32,
pub reserved_3: u32,
pub sig_data: u64,
pub config3: u64,
}Expand description
Miroir #[repr(C)] de struct perf_event_attr (136 octets, ver. 6.12).
Champs aux noms kernel ; Default (tout à zéro) est un attribut valide.
Le champ flags agrège les bitfields kernel (disabled, inherit,
exclude_kernel…) — voir les constantes associées. Un builder ergonomique
relève de la couche 1.
Fields§
§kind: u32type — famille de l’événement (PERF_TYPE_*).
size: u32size — taille de la structure (renseignée par le wrapper).
config: u64config — événement précis dans la famille.
sample_period_or_freq: u64sample_period / sample_freq.
sample_type: u64sample_type — champs échantillonnés (PERF_SAMPLE_*).
read_format: u64read_format — format de lecture (PERF_FORMAT_*).
flags: u64Bitfields agrégés (disabled, inherit, exclude_kernel…).
wakeup: u32wakeup_events / wakeup_watermark.
bp_type: u32bp_type.
config1: u64bp_addr / config1.
config2: u64bp_len / config2.
branch_sample_type: u64branch_sample_type.
sample_regs_user: u64sample_regs_user.
sample_stack_user: u32sample_stack_user.
clockid: i32clockid.
sample_regs_intr: u64sample_regs_intr.
aux_watermark: u32aux_watermark.
sample_max_stack: u16sample_max_stack.
reserved_2: u16__reserved_2.
aux_sample_size: u32aux_sample_size.
reserved_3: u32__reserved_3.
sig_data: u64sig_data.
config3: u64config3.
Implementations§
Source§impl PerfEventAttr
impl PerfEventAttr
Sourcepub const FLAG_DISABLED: u64
pub const FLAG_DISABLED: u64
disabled:1 — démarre désactivé.
Sourcepub const FLAG_INHERIT: u64
pub const FLAG_INHERIT: u64
inherit:1 — hérité par les tâches filles.
Sourcepub const FLAG_PINNED: u64
pub const FLAG_PINNED: u64
pinned:1.
Sourcepub const FLAG_EXCLUSIVE: u64
pub const FLAG_EXCLUSIVE: u64
exclusive:1.
Sourcepub const FLAG_EXCLUDE_USER: u64
pub const FLAG_EXCLUDE_USER: u64
exclude_user:1.
Sourcepub const FLAG_EXCLUDE_KERNEL: u64
pub const FLAG_EXCLUDE_KERNEL: u64
exclude_kernel:1.
Sourcepub const FLAG_EXCLUDE_HV: u64
pub const FLAG_EXCLUDE_HV: u64
exclude_hv:1.
Sourcepub const FLAG_EXCLUDE_IDLE: u64
pub const FLAG_EXCLUDE_IDLE: u64
exclude_idle:1.
Trait Implementations§
Source§impl Clone for PerfEventAttr
impl Clone for PerfEventAttr
Source§fn clone(&self) -> PerfEventAttr
fn clone(&self) -> PerfEventAttr
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more