#[non_exhaustive]pub enum TimelineEvent {
Switch {
ts: u64,
cpu: u32,
prev_pid: u32,
next_pid: u32,
prev_state: u64,
preempt: bool,
},
Migrate {
ts: u64,
cpu: u32,
pid: u32,
orig_cpu: u32,
dest_cpu: u32,
},
Wakeup {
ts: u64,
cpu: u32,
pid: u32,
target_cpu: u32,
},
PiBoost {
ts: u64,
cpu: u32,
prober_tid: u32,
pid: u32,
old_prio: i32,
new_prio: i32,
},
LockContend {
ts: u64,
cpu: u32,
tid: u32,
lock_kva: u64,
flags: u32,
},
Unknown {
ts: u64,
cpu: u32,
type_: u32,
prev_pid: u32,
next_pid: u32,
a: u64,
b: u64,
},
}Expand description
Parsed timeline event with variant-aware field naming.
non_exhaustive so future BPF event types added in intf.h
(per the TL_EVT_PI_BOOST / TL_EVT_LOCK_CONTEND sites) can land
without breaking existing on-disk dumps.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Switch
tp_btf/sched_switch. The kernel switched from prev_pid
to next_pid on cpu at ts (boot-time ns).
Fields
Migrate
tp_btf/sched_migrate_task. Task pid migrated from
orig_cpu to dest_cpu.
Wakeup
tp_btf/sched_wakeup. Task pid woken up; scheduler
chose target_cpu for placement.
PiBoost
PI boost. Probe-context tid prober_tid; boosted task
pid. old_prio/new_prio are the boosted task’s effective
kernel priority (signed int) before and after the boost.
Scheduling-class transitions are counted separately via the
pi_class_changes counter, not carried in this record. Field
layout per src/bpf/intf.h::TL_EVT_PI_BOOST.
LockContend
Lock contention begin. tid is the waiter; lock_kva is
the lock’s kernel virtual address; flags carries the
LCB_* class bits (F_SPIN, F_READ, F_WRITE, F_RT — see
include/trace/events/lock.h).
Unknown
Unrecognized type byte. Library doesn’t drop unknown
records — surfacing them as Unknown lets the failure
dump preserve forward-compat data the consumer can opt
into rendering later.
Trait Implementations§
Source§impl Clone for TimelineEvent
impl Clone for TimelineEvent
Source§fn clone(&self) -> TimelineEvent
fn clone(&self) -> TimelineEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimelineEvent
impl Debug for TimelineEvent
Source§impl<'de> Deserialize<'de> for TimelineEvent
impl<'de> Deserialize<'de> for TimelineEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TimelineEvent
impl RefUnwindSafe for TimelineEvent
impl Send for TimelineEvent
impl Sync for TimelineEvent
impl Unpin for TimelineEvent
impl UnwindSafe for TimelineEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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