domain switch

steve freyder steve at freyder.net
Sun Jan 3 00:06:21 CET 2021


Right.


AKA, "mode switch", a switch from "primary mode" to "secondary mode", or 
vice versa.

One place you can find that information is in:

/proc/xenomai/sched/acct

there are two fields MSW, and CSW which count mode/context switches 
per-process. This requires an open, a read loop to locate the desired 
pid and extract the desired information, then either rewind or 
close/reopen to do it again - all of which will almost surely generate 
more mode/context switching.


On 1/2/2021 2:54 PM, Leandro Bucci via Xenomai wrote:
> Hi, I wanted to know if there was a way to count the number of times a
> domain switch happens.
> For example the printf () function causes a domain switch, right?


More information about the Xenomai mailing list