Expand description
Wakeup policy for “overflow notifications”. This controls the point at
which the read call completes. (TODO: double check this)
There are two ways to generate overflow notifications.
The first is to set a
WakeupPolicythat will trigger if a certain number of samples or bytes have been written to the mmap ring buffer.The other way is by use of the PERF_EVENT_IOC_REFRESH ioctl. This ioctl adds to a counter that decrements each time the event overflows. When nonzero, POLLIN is indicated, but once the counter reaches 0 POLLHUP is indicated and the underlying event is disabled.
Variants
EventCount(u32)
Wake up every time N records of type RecordType::SAMPLE have been
written to the mmap ring buffer.
Watermark(u32)
Wake up after N bytes of any record type have been written to the mmap ring buffer.
To receive a wakeup after every single record, choose Watermark(1).
Watermark(0) is treated the same as Watermark(1).
Trait Implementations
sourceimpl Clone for WakeupPolicy
impl Clone for WakeupPolicy
sourcefn clone(&self) -> WakeupPolicy
fn clone(&self) -> WakeupPolicy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for WakeupPolicy
impl Debug for WakeupPolicy
impl Copy for WakeupPolicy
Auto Trait Implementations
impl RefUnwindSafe for WakeupPolicy
impl Send for WakeupPolicy
impl Sync for WakeupPolicy
impl Unpin for WakeupPolicy
impl UnwindSafe for WakeupPolicy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more