I’m pleased to announce the release of Fibratus 0.3.0. This version ships with support for context switch instrumentation through the ContextSwitch kernel event type.
What’s new
Because the context switch instrumentation generates a massive volume of events, it is disabled by default. There is a new --cswitch command line flag to activate the stream of context switch events.
Let’s see what does those event’s parameters mean.
cpu is the identifier of the CPU core where the new thread is running after the context switch has taken place
next_proc_name identifies the process name of the thread which has been chosen by the scheduler
next_thread_id is the identifier of the new thread
next_thread_prio the priority of the new thread
next_thread_wait_time is the time thread has spent waiting in the ready queue before receiving the slice of the CPU time
prev_proc_name the process name of the thread which has been preempted by the kernel. The scheduler assigns the CPU to the new thread
prev_thread_id is the identifier of the old thread
prev_thread_prio the priority of the old thread
prev_thread_state determines the state of the previous thread
prev_thread_wait_mode indicates if the previous thread has been executing in the user space or in the kernel space
prev_thread_wait_reason the action emitted by the thread right before the dispatcher has moved it from the running queue
If you have any feedback or want to contribute you can reach out via Github or drop me an email.