Struct perf_event_attr_t
#[repr(C)]pub struct perf_event_attr_t {Show 45 fields
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,
/* private fields */
}
dep_nc
only.Expand description
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_t
§sample_type: u64
§read_format: u64
§disabled: 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_t
§bp_type: u32
§config1: perf_event_attr_config1_t
§config2: perf_event_attr_config2_t
§branch_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: i32
§sample_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§
impl Freeze for perf_event_attr_t
impl RefUnwindSafe for perf_event_attr_t
impl Send for perf_event_attr_t
impl Sync for perf_event_attr_t
impl Unpin for perf_event_attr_t
impl UnwindSafe for perf_event_attr_t
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize ⓘ
fn byte_align(&self) -> usize ⓘ
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of_val(&self) -> usize ⓘ
fn mem_align_of_val(&self) -> usize ⓘ
Source§fn mem_size_of_val(&self) -> usize ⓘ
fn mem_size_of_val(&self) -> usize ⓘ
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.