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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.