From: michel.dagenais@polymtl.ca (Michel Dagenais)
Subject: [lttng-dev] introduction & usage of LTTNG in machinekit
Date: Mon, 27 Apr 2015 17:40:31 -0400 (EDT) [thread overview]
Message-ID: <1701154511.14233563.1430170831219.JavaMail.zimbra@polymtl.ca> (raw)
In-Reply-To: <AC8E2872-A806-4F43-A1E1-0E077697979D@mah.priv.at>
> The problem at hand has these characteristics:
>
> - it happens only on low-end ARM platforms
> - the code is part of the trajectory planner, which involves fp and
> transcendental functions
> - the code is executed from a period Xenomai thread and once in a while
> execution time exceeds the cycle time budget
> - no interrupts, system call, or Xenomai API call is involved, so kernel or
> ipipe tracing will not help to narrow it down
I suppose that the time period is in the order of 100us or more?
> my idea was to insert trace points in the tp code and one triggered on 'time
> window exceeded' so one could look backwards in history to determine which
> span of code used excessive time; does this sound reasonable?
In most cases the surprises come from interrupts and competition for resources. If everything is within the tp code, indeed internal tracepoints will help. If you want to be more fancy, there are a few more complicated options. You could trace in "flight recorder" mode, without recording to disk, and trigger a snapshot of the circular buffer content only when a cycle time budget overflow is detected. You could also have a timer, armed for the time window limit, that triggers a stack dump on the interrupted task when fired.
> Alex (in cc) has a test case which reproducibly triggers the problem
Rafa?l will start next week. That would indeed be an interesting problem given that it is reproducible.
> That's pretty impressive. I'll try to reproduce an example and think through
> how this could fit into what we're doing.
>
> Background is - we're getting more into supporting fieldbus-connected
> components, some of which might run our code, so distributed tracing would
> become an option
...
> The other area where I could find use for such a capability is UI/server
> interaction (could it be there might be much wider interest for this than
> just me?)
Indeed, as long as you can record a trace on each node with local timestamps, and have event pairs with a causal relationship in each direction, it should work. You bring the traces together for analysis and synchronize them using these event pairs.
next prev parent reply other threads:[~2015-04-27 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <887B7027-5FE6-4D13-B35A-7DCBD785DC57@mah.priv.at>
[not found] ` <711173584.2718642.1427481342189.JavaMail.zimbra@polymtl.ca>
[not found] ` <8187A8CE-F16D-4CDE-B969-380DE308A8D5@mah.priv.at>
[not found] ` <826926538.3126946.1427639461728.JavaMail.zimbra@polymtl.ca>
[not found] ` <76BAB974-2B32-469C-82AD-4D5630AFA28E@mah.priv.at>
2015-04-26 13:31 ` Michel Dagenais
2015-04-27 11:41 ` Michael Haberler
2015-04-27 12:30 ` Michel Dagenais
2015-04-27 20:41 ` Michael Haberler
2015-04-27 21:40 ` Michel Dagenais [this message]
2015-04-28 2:00 ` Michel Dagenais
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=1701154511.14233563.1430170831219.JavaMail.zimbra@polymtl.ca \
--to=michel.dagenais@polymtl.ca \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox