pub enum PerfClock {
Default,
ClockId(ClockId),
}
Expand description
This allows selecting which internal Linux clock to use when generating timestamps.
Setting a specific ClockId can make it easier to correlate perf sample times with timestamps generated by other tools. For example, when sampling applications which emit JITDUMP information, you’ll usually select the moonotonic clock. This makes it possible to correctly order perf event records and JITDUMP records - those also usually use the monotonic clock.
Variants§
Default
The default clock. If this is used, the timestamps in event records
are obtained with local_clock()
which is a hardware timestamp if
available and the jiffies value if not.
In practice, on x86_64 this seems to use ktime_get_ns() which is the number of nanoseconds since boot.
ClockId(ClockId)
A specific clock.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerfClock
impl RefUnwindSafe for PerfClock
impl Send for PerfClock
impl Sync for PerfClock
impl Unpin for PerfClock
impl UnwindSafe for PerfClock
Blanket Implementations§
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
Mutably borrows from an owned value. Read more