From: steve freyder <steve@freyder.net>
To: Leandro Bucci <guestleandro11@gmail.com>, xenomai@xenomai.org
Subject: Re: domain switch
Date: Sat, 2 Jan 2021 17:06:21 -0600 [thread overview]
Message-ID: <fa5f0b2a-4f92-343c-b00d-0d75ee79a97e@freyder.net> (raw)
In-Reply-To: <CAFZ-hKjeJZGD7s54hH_QURdY4z=ViUEz3_mrgQbwH4pX4weY+g@mail.gmail.com>
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?
next prev parent reply other threads:[~2021-01-02 23:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-02 20:54 domain switch Leandro Bucci
2021-01-02 23:06 ` steve freyder [this message]
2021-01-03 1:29 ` Leandro Bucci
2021-01-03 10:31 ` Philippe Gerum
2021-01-03 10:54 ` Leandro Bucci
2021-01-03 11:06 ` Philippe Gerum
2021-01-03 11:20 ` Leandro Bucci
2021-01-03 18:24 ` Leandro Bucci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa5f0b2a-4f92-343c-b00d-0d75ee79a97e@freyder.net \
--to=steve@freyder.net \
--cc=guestleandro11@gmail.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.