All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Jeff Weber <jweber@domain.hid>
Cc: Xenomai Help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] tracer from user space
Date: Sat, 17 Feb 2007 10:05:04 +0100	[thread overview]
Message-ID: <45D6C540.9020707@domain.hid> (raw)
In-Reply-To: <200702161558.01839.jweber@domain.hid>

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

Jeff Weber wrote:
> I need to isolate an unacceptable latency resuming a primary mode task, by 
> determining the events the events that preceeded the delay, preferably from 
> userspace.  I cannot rule out a userspace coding error contributing to the 
> latency.
> 
> Is this a job better suited to task switch hooks, or the ipipe tracer, or 
> perhaps yet another tool?

Hard to say, but often the tracer is a good starting point, at least to
rule out certain causes.

> 
> Assuming the best tool is the ipipe tracer, because task switch hooks must be 
> used from kernel space, how much can I learn about the user space tasks and 
> function calls that preceeded the latency?
> 
> (All the sample tracer output I've found has shown kernel function call 
> activity.)

The tracer can only record in-kernel function calls and special
instrumented spots (Xenomai task switches e.g.). Given your user space
app generates some minimal syscall "load", you can indirectly observe
what happens. If it decides to just spin for a few milliseconds or so,
then you will have to look for a different approach. (*)

> 
> What is the minimum ipipe patch to have useful tracer functionality?
> (I'm currently using Linux-2.6.17.14 + adeos-ipipe-2.6.17-i386-1.5-00 + 
> xenomai-2.2.4 )

That patch already included a full-functional tracer, you just have to
enable it in the kernel config.

I guess you've already read the tracer-dedicated page on xenomai.org.
It's unfinished, so feel free to kick me if some specific explanation
should be added - or add helpful hints on your own.

Jan


(*) I just rolled out a simple framework for user-space tracing, see
xenomai-core list. It allows to instrument your code unintrusively,
without stepping out of primary mode: rt_printf. Based on it, syscall
tracing is feasible as well ("rt-strace"). The patches are trunk-based,
but its core, librtprint, can also be broken out.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

  reply	other threads:[~2007-02-17  9:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16 21:58 [Xenomai-help] tracer from user space Jeff Weber
2007-02-17  9:05 ` Jan Kiszka [this message]
2007-02-19 22:54   ` Jeff Weber
2007-02-19 23:35     ` 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=45D6C540.9020707@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=jweber@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.