From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [ltt-dev] SystemTAP support in tracepoints
Date: Wed, 13 Apr 2011 12:58:12 -0400 [thread overview]
Message-ID: <20110413165812.GB21057@Krystal> (raw)
In-Reply-To: <1302711433.7877.19.camel@springer.wildebeest.org>
* Mark Wielaard (mjw at redhat.com) wrote:
> On Wed, 2011-04-13 at 11:38 -0400, Mathieu Desnoyers wrote:
> > * Mark Wielaard (mjw at redhat.com) wrote:
> > > I have just been using the following configure check:
> > >
> > > AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
> > > [SDT_H_FOUND='no';
> > > AC_MSG_ERROR([systemtap support needs sys/sdt.h header])])
> > >
> > > Which you can adapt to your needs with/without error message, including
> > > an test to see if it fully works for your environment.
> >
> > Thanks for the hint, but adding this test in the UST build system don't
> > really make sense, because both systemtap and UST don't have dependency
> > on each other, and thus the build order between the two packages is not
> > fixed. So the detection should be done when the UST header is being
> > included into an application rather than at UST configuration time. And
> > I don't want to require all applications that want to use tracepoint to
> > use autoconf neither.
>
> Sure autoconf is optional. But if you want UST tracepoints to be
> recognized by other consumers that use SDT probe points, then just
> depending on the availability of sys/sdt.h in UST seems to make the most
> sense. Note that sys/sdt.h is kind of independent from systemtap proper.
> It can be installed independently from the systemtap stap translator or
> runtime. And it is only a build dependency, not a runtime dependency.
> All consumers just parse the notes section to get the addresses to place
> their probes and extract the arguments. There is even a binutils bfd
> extractor now.
So we seem to have two choices here: either add a dependency on the
package providing sdt.h in UST, or copy sdt.h into UST (it's public
domain, so the licensing permits it).
For the package dependency: I'd need to know:
1 - which package provide sdt.h.
2 - which distributions provide it.
3 - what the dependencies of the package are.
4 - which architectures are supported by this package.
we must keep in mind that UST targets many distributions and many
architectures.
For the sdt.h copy: we could certainly ship it into UST too. It might be
much, much easier. I would put it in ust/sdt.h so we don't overwrite the
SystemTAP header when we install it. We'd have to be careful about
changes to this header though, because we can end up with two entirely
different versions. The #ifndef _SYS_SDT_H would take care of handling
multiple inclusion of the ust and systemtap sdt.h header incarnations.
One way to handle this versioning problem would be to define a header
"version" at the beginning of sdt.h in both SystemTAP and UST
incarnations:
#define _THIS_SDT_H_VERSION 3
#if (!defined(_SDT_H_VERSION) || _SDT_H_VERSION < _THIS_SDT_H_VERSION)
either
#undef all sdt.h macros
/* rest of the sdt.h header */
or
/* this scheme would require that we only append to the SDT macros,
* never change the macros per se */
#ifndef each macro name
#define macro
#endif
#endif
#undef _SDT_H_VERSION
#define _SDT_H_VERSION _THIS_SDT_H_VERSION
#undef _THIS_SDT_H_VERSION
Thoughts ?
Thanks,
Mathieu
>
> Cheers,
>
> Mark
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2011-04-13 16:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 17:44 Mathieu Desnoyers
2011-04-11 21:19 ` Josh Stone
2011-04-11 22:29 ` Josh Stone
2011-04-12 16:57 ` Frank Ch. Eigler
2011-04-12 18:35 ` Mathieu Desnoyers
2011-04-12 18:45 ` Frank Ch. Eigler
2011-04-12 18:48 ` Mathieu Desnoyers
2011-04-12 18:59 ` Frank Ch. Eigler
2011-04-12 19:12 ` Mark Wielaard
2011-04-13 15:38 ` Mathieu Desnoyers
[not found] ` <BLU0-SMTP42E61B0C2D4283651878B896AA0@phx.gbl>
2011-04-13 16:17 ` Mark Wielaard
2011-04-13 16:58 ` Mathieu Desnoyers [this message]
2011-04-13 17:24 ` Josh Stone
2011-04-13 17:29 ` Mark Wielaard
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=20110413165812.GB21057@Krystal \
--to=mathieu.desnoyers@efficios.com \
/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