pub struct PerfEventAttr {Show 15 fields
pub type_: PerfEventType,
pub sampling_policy: SamplingPolicy,
pub sample_format: SampleFormat,
pub read_format: ReadFormat,
pub flags: AttrFlags,
pub wakeup_policy: WakeupPolicy,
pub branch_sample_format: BranchSampleFormat,
pub sample_regs_user: u64,
pub sample_stack_user: u32,
pub clock: PerfClock,
pub sample_regs_intr: u64,
pub aux_watermark: u32,
pub sample_max_stack: u16,
pub aux_sample_size: u32,
pub sig_data: u64,
}
Expand description
perf_event_attr
Fields§
§type_: PerfEventType
The type of the perf event.
sampling_policy: SamplingPolicy
The sampling policy.
sample_format: SampleFormat
Specifies values included in sample. (original name sample_type
)
read_format: ReadFormat
Specifies the structure values returned by read() on a perf event fd,
see ReadFormat
.
flags: AttrFlags
Bitset of flags.
wakeup_policy: WakeupPolicy
The wake-up policy.
branch_sample_format: BranchSampleFormat
Branch-sample specific flags.
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.
clock: PerfClock
The clock ID.
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
When collecting stacks, this is the maximum number of stack frames (user + kernel) to collect.
aux_sample_size: u32
When sampling AUX events, this is the size of the AUX sample.
sig_data: u64
User provided data if sigtrap=1, passed back to user via siginfo_t::si_perf_data, e.g. to permit user to identify the event. Note, siginfo_t::si_perf_data is long-sized, and sig_data will be truncated accordingly on 32 bit architectures.
Implementations§
Trait Implementations§
Source§impl Clone for PerfEventAttr
impl Clone for PerfEventAttr
Source§fn clone(&self) -> PerfEventAttr
fn clone(&self) -> PerfEventAttr
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more