Skip to main content

PerfEventAttr

Struct PerfEventAttr 

Source
#[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: u32

type — famille de l’événement (PERF_TYPE_*).

§size: u32

size — taille de la structure (renseignée par le wrapper).

§config: u64

config — événement précis dans la famille.

§sample_period_or_freq: u64

sample_period / sample_freq.

§sample_type: u64

sample_type — champs échantillonnés (PERF_SAMPLE_*).

§read_format: u64

read_format — format de lecture (PERF_FORMAT_*).

§flags: u64

Bitfields agrégés (disabled, inherit, exclude_kernel…).

§wakeup: u32

wakeup_events / wakeup_watermark.

§bp_type: u32

bp_type.

§config1: u64

bp_addr / config1.

§config2: u64

bp_len / config2.

§branch_sample_type: u64

branch_sample_type.

§sample_regs_user: u64

sample_regs_user.

§sample_stack_user: u32

sample_stack_user.

§clockid: i32

clockid.

§sample_regs_intr: u64

sample_regs_intr.

§aux_watermark: u32

aux_watermark.

§sample_max_stack: u16

sample_max_stack.

§reserved_2: u16

__reserved_2.

§aux_sample_size: u32

aux_sample_size.

§reserved_3: u32

__reserved_3.

§sig_data: u64

sig_data.

§config3: u64

config3.

Implementations§

Source§

impl PerfEventAttr

Source

pub const FLAG_DISABLED: u64

disabled:1 — démarre désactivé.

Source

pub const FLAG_INHERIT: u64

inherit:1 — hérité par les tâches filles.

Source

pub const FLAG_PINNED: u64

pinned:1.

Source

pub const FLAG_EXCLUSIVE: u64

exclusive:1.

Source

pub const FLAG_EXCLUDE_USER: u64

exclude_user:1.

Source

pub const FLAG_EXCLUDE_KERNEL: u64

exclude_kernel:1.

Source

pub const FLAG_EXCLUDE_HV: u64

exclude_hv:1.

Source

pub const FLAG_EXCLUDE_IDLE: u64

exclude_idle:1.

Trait Implementations§

Source§

impl Clone for PerfEventAttr

Source§

fn clone(&self) -> PerfEventAttr

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PerfEventAttr

Source§

impl Debug for PerfEventAttr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PerfEventAttr

Source§

fn default() -> PerfEventAttr

Returns the “default value” for a type. Read more
Source§

impl Eq for PerfEventAttr

Source§

impl PartialEq for PerfEventAttr

Source§

fn eq(&self, other: &PerfEventAttr) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PerfEventAttr

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.