From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gsellmann Peter <Peter.Gsellmann@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] accessing context switch counter from rttask
Date: Tue, 26 Jun 2007 17:39:25 +0200 [thread overview]
Message-ID: <4681332D.2030105@domain.hid> (raw)
In-Reply-To: <15cf230500002197@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
Gsellmann Peter wrote:
> Hi!
>
> I searched for a while and found this snippet
>
> RT_TASK *rt = rt_task_self();
> int x = rt->thread_base.stat.csw;
>
> should give the number of context switches, but:
> RT_TASK in non-kernel mode is only RT_TASK_PLACEHOLDER so i have no
> access to thread_base!
>
> Is there an official way to get this info (w/o opening
> "/proc/xenomai/...")?
>
Not yet. You could extend RT_TASK_INFO with this statistic (obtained via
rt_task_inquire). There is currently work in progress to add accumulated
execution times to the same interface, so this extension would fit quite
well. Patches always welcome.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-06-26 15:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-26 15:01 [Xenomai-help] accessing context switch counter from rttask Gsellmann Peter
2007-06-26 15:01 ` Gsellmann Peter
2007-06-26 15:39 ` Jan Kiszka [this message]
2007-07-08 12:00 ` Jan Kiszka
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=4681332D.2030105@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Peter.Gsellmann@domain.hid \
--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.