[][src]Struct nc::types::perf_event_attr_t

#[repr(C)]
pub struct perf_event_attr_t {
    pub type_: u32,
    pub size: u32,
    pub config: u64,
    pub sample: perf_event_attr_sample_t,
    pub sample_type: u64,
    pub read_format: u64,
    pub disabled: u8,
    pub inherit: u8,
    pub pinned: u8,
    pub exclusive: u8,
    pub exclude_user: u8,
    pub exclude_kernel: u8,
    pub exclude_hv: u8,
    pub exclude_idle: u8,
    pub mmap: u8,
    pub comm: u8,
    pub freq: u8,
    pub inherit_stat: u8,
    pub enable_on_exec: u8,
    pub task: u8,
    pub watermark: u8,
    pub precise_ip: u8,
    pub mmap_data: u8,
    pub sample_id_all: u8,
    pub exclude_host: u8,
    pub exclude_guest: u8,
    pub exclude_callchain_kernel: u8,
    pub exclude_callchain_user: u8,
    pub mmap2: u8,
    pub comm_exec: u8,
    pub use_clockid: u8,
    pub context_switch: u8,
    pub write_backward: u8,
    pub namespaces: u8,
    pub wakeup: perf_event_attr_wakeup_t,
    pub bp_type: u32,
    pub config1: perf_event_attr_config1_t,
    pub config2: perf_event_attr_config2_t,
    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,
    // some fields omitted
}

Hardware event_id to monitor via a performance monitoring event:

@sample_max_stack: Max number of frame pointers in a callchain should be < /proc/sys/kernel/perf_event_max_stack

Fields

type_: u32

Major type: hardware/software/tracepoint/etc.

size: u32

Size of the attr structure, for fwd/bwd compat.

config: u64

Type specific configuration information.

sample: perf_event_attr_sample_tsample_type: u64read_format: u64disabled: u8

off by default

inherit: u8

children inherit it

pinned: u8

must always be on PMU

exclusive: u8

only group on PMU

exclude_user: u8

don't count user

exclude_kernel: u8

ditto kernel

exclude_hv: u8

ditto hypervisor

exclude_idle: u8

don't count when idle

mmap: u8

include mmap data

comm: u8

include comm data

freq: u8

use freq, not period

inherit_stat: u8

per task counts

enable_on_exec: u8

next exec enables

task: u8

trace fork/exit

watermark: u8

wakeup_watermark

precise_ip: u8

precise_ip: 0 - SAMPLE_IP can have arbitrary skid 1 - SAMPLE_IP must have constant skid 2 - SAMPLE_IP requested to have 0 skid 3 - SAMPLE_IP must have 0 skid

See also PERF_RECORD_MISC_EXACT_IP skid constraint

mmap_data: u8

non-exec mmap data

sample_id_all: u8

sample_type all events

exclude_host: u8

don't count in host

exclude_guest: u8

don't count in guest

exclude_callchain_kernel: u8

exclude kernel callchains

exclude_callchain_user: u8

exclude user callchains

mmap2: u8

include mmap with inode data

comm_exec: u8

flag comm events that are due to an exec

use_clockid: u8

use @clockid for time fields

context_switch: u8

context switch data

write_backward: u8

Write ring buffer from end to beginning

namespaces: u8

include namespaces data

wakeup: perf_event_attr_wakeup_tbp_type: u32config1: perf_event_attr_config1_tconfig2: perf_event_attr_config2_tbranch_sample_type: u64

enum perf_branch_sample_type

sample_regs_user: u64

Defines set of user regs to dump on samples. See asm/perf_regs.h for details.

sample_stack_user: u32

Defines size of the user stack to dump on samples.

clockid: i32sample_regs_intr: u64

Defines set of regs to dump for each sample state captured on:

  • precise = 0: PMU interrupt
  • precise > 0: sampled instruction

See asm/perf_regs.h for details.

aux_watermark: u32

Wakeup watermark for AUX area

sample_max_stack: u16

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]