All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Debug/trace tools for xenomai applications.
@ 2010-11-14  0:24 ronny meeus
  2010-11-15  9:30 ` Philippe Gerum
  0 siblings, 1 reply; 14+ messages in thread
From: ronny meeus @ 2010-11-14  0:24 UTC (permalink / raw)
  To: Xenomai-help

[-- Attachment #1: Type: text/plain, Size: 2034 bytes --]

Hello

I'm currently fighting with a problem in the pSOS+ skin.
This my system information:

[    2.314676] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    2.416025] I-pipe: Domain Xenomai registered.
[    2.418183] Xenomai: hal/i386 started.
[    2.422780] Xenomai: scheduling class idle registered.
[    2.424116] Xenomai: scheduling class rt registered.
[    2.566737] Xenomai: real-time nucleus v2.5.4 (Sleep Walk) loaded.
[    2.590628] Xenomai: starting native API services.
[    2.604491] Xenomai: starting pSOS+ services.
[    2.619941] HugeTLB registered 4 MB page size, pre-allocated 0 pages

This is a piece of testcode I have created:

        check("tm_evevery",tm_evevery(4,3,&tmr_id),0);
        check("tm_cancel",tm_cancel(tmr_id),0);
        ev_rcvd = 0;
        ret = ev_receive(4,EV_ANY|EV_WAIT,10,&ev_rcvd);
        check("ev_receive",ret,ERR_TIMEOUT);

I just start a periodic timer that expires every 3 ticks and at expiry sends
event 4 to my task.
I want to check the cancel of the timer, so I cancel it and I would expect
not to receive any event.

What I observe is that this code is not working: I immediately receive the
event after starting the timer.
If I change the code like shown below (I added the ev_receive with the
NO_WAIT option after starting the timer), the code works fine.

        check("tm_evevery",tm_evevery(4,3,&tmr_id),0);
        ret = ev_receive(4,EV_ANY|EV_NOWAIT,0,&ev_rcvd);
        check("tm_cancel",tm_cancel(tmr_id),0);
        ev_rcvd = 0;
        ret = ev_receive(4,EV_ANY|EV_WAIT,10,&ev_rcvd);
        check("ev_receive",ret,ERR_TIMEOUT);

Now my question is: how do I investigate an issue like this? In other words,
which are the best tools since this code involves both user and kernel space
debugging.
Are there some trace tools available that are able to generate a kind of
sequence / trace of what is happing over time.

I also have other issues that are not consistently reproducible. For this
kind of problems trace tools would also be useful.

Thanks
Ronny

[-- Attachment #2: Type: text/html, Size: 2267 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [Xenomai-help] Debug/trace tools for xenomai applications.
@ 2010-11-14 11:27 Andreas Glatz
  2010-11-14 15:36 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Glatz @ 2010-11-14 11:27 UTC (permalink / raw)
  To: xenomai

> Now my question is: how do I investigate an issue like this? In other words,
> which are the best tools since this code involves both user and kernel space
> debugging.
> Are there some trace tools available that are able to generate a kind of
> sequence / trace of what is happing over time.
>
> I also have other issues that are not consistently reproducible. For this
> kind of problems trace tools would also be useful.
>

I have debugged such issues with LTTng ( http://lttng.org/ ). There
are trace points in the Xenomai nucleus ( grep -rw xn_nucleus
/path/to/xenomai/* ) and skins (at least the native skin). You could
for example set up 'one-shot' tracing where events are continuously
added to the Lttng event ring buffer until a condition is satisfied
(i.e. your error condition) and analyse it either with Lttv or by
looking at the textual output.

It takes some time to set things up. You need (1) to add the LTTng
patches to your kernel and recompile the whole thing. In general,
there are just LTTng patches for vanilla kernels available. So you
have to expect some manual work there. (2) You have to compile the
user-space daemon for your target: You need it to control the tracing.
(3) Lttv for your host (if you like a little bit of comfort when
analysing your traces).

Andreas


^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <mailman.45.1289905237.25153.xenomai@xenomai.org>]

end of thread, other threads:[~2010-11-17 15:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-14  0:24 [Xenomai-help] Debug/trace tools for xenomai applications ronny meeus
2010-11-15  9:30 ` Philippe Gerum
2010-11-15 13:10   ` Gilles Chanteperdrix
2010-11-15 15:07     ` Philippe Gerum
2010-11-15 20:26       ` ronny meeus
2010-11-15 20:56         ` Philippe Gerum
2010-11-17 13:49   ` ronny meeus
2010-11-17 14:01     ` Philippe Gerum
2010-11-17 15:00       ` ronny meeus
  -- strict thread matches above, loose matches on Subject: below --
2010-11-14 11:27 Andreas Glatz
2010-11-14 15:36 ` Gilles Chanteperdrix
     [not found] <mailman.45.1289905237.25153.xenomai@xenomai.org>
2010-11-16 11:46 ` Andreas Glatz
2010-11-17  8:43   ` Philippe Gerum
2010-11-17  9:42     ` Jan Kiszka

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.