From: Philippe Gerum <rpm@xenomai.org>
To: "Moser, Dan" <DMoser@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: FW: [Xenomai-help] Xenomai thread runtime statistics
Date: Fri, 17 Mar 2006 16:57:31 +0100 [thread overview]
Message-ID: <441ADC6B.5010909@domain.hid> (raw)
In-Reply-To: <067C9A1F6AFEB643895EA4513E116884178FC4@domain.hid>
Moser, Dan wrote:
> Hi,
>
> I am still searching for ways (hopefully via some API(s)) to get Xenomai
> run-time thread execution info (my original post is below).
>
> Being a newbie, I apologize if the answer "should be obvious". I am
> still getting up to speed with both Linux and Xenomai.
>
> Is there a better list on which I should post this question?
>
This question is perfectly relevant to this list, the thing is that there's no
simple, built-in way of getting execution stats for real-time threads yet. The
best way to find out the execution time of your work cycle would be to measure it
using the high precision clock information.
With the Xenomai-enabled POSIX API, you can use clock_gettime(CLOCK_MONOTONIC) to
get a precise timestamp derived from the onboard TSC. With the native API,
rt_timer_tsc() returns the same information.
e.g.
for (;;) {
struct timespec ts_start, ts_end;
clock_gettime(CLOCK_MONOTONIC,&ts_start);
<work>
clock_gettime(CLOCK_MONOTONIC,&ts_end);
/* work cycle consumption: ts_end - ts_start */
}
> Hope to hear from someone.
>
>
> Thanks,
> Dan
>
>
>
>
>>-----Original Message-----
>>From: xenomai-help-bounces@domain.hid
>>[mailto:xenomai-help-bounces@domain.hid] On Behalf Of Moser, Dan
>>Sent: Wednesday, March 15, 2006 4:06 PM
>>To: xenomai@xenomai.org
>>Subject: [Xenomai-help] Xenomai thread runtime statistics
>>
>>Hi,
>>
>>I am seeking whatever information is available regarding
>>Xenomai task runtime statistics. Things such as thread
>>real-time usage, CPU usage, etc. and how to access that
>>information from within an application.
>>
>>In particular, I would like to find out things such as how long (in
>>real-time) each iteration of a given periodic task takes to
>>run. I ultimately want to use this info to figure out how
>>much "head room" I have left in a given rate group of a
>>multi-rate/multi-tasking control system.
>>
>>Thanks in advance,
>>Dan
>>
>>_______________________________________________
>>Xenomai-help mailing list
>>Xenomai-help@domain.hid
>>https://mail.gna.org/listinfo/xenomai-help
>>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
--
Philippe.
next prev parent reply other threads:[~2006-03-17 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-17 15:17 FW: [Xenomai-help] Xenomai thread runtime statistics Moser, Dan
2006-03-17 15:57 ` Philippe Gerum [this message]
2006-03-17 16:11 ` Jan Kiszka
2006-03-17 16:13 ` Philippe Gerum
2006-03-17 16:22 ` Jan Kiszka
2006-03-17 16:26 ` Philippe Gerum
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=441ADC6B.5010909@domain.hid \
--to=rpm@xenomai.org \
--cc=DMoser@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.