DTrace probes & klds

Daniel O'Connor doconnor at gsoft.com.au
Thu Aug 20 07:43:13 UTC 2009


On Thu, 20 Aug 2009, Alexander Leidinger wrote:
> Quoting Daniel O'Connor <doconnor at gsoft.com.au> (from Wed, 19 Aug
> 2009
>
> 23:31:33 +0930):
> > Content-Type: text/plain;
> >   charset="utf-8"
> > Content-Transfer-Encoding: quoted-printable
> > Content-Disposition: inline
> >
> > Is it possible? the handbook implies not and I can't get it to
> > work, but i could be doing it wrong..
> >
> > I get fbt traces listed for KLDs (I get new entries for each load
> > of the KLD which seems like a potential problem) but I can't
> > specify an SDT_PROBE and have it work.
>
> Can you show us some example code?

/* Recycle fbt as SDT_PROVIDER_DEFINE is said not to work */
SDT_PROBE_DEFINE(fbt, gsio, gsio_intr, test);
SDT_PROBE_ARGTYPE(fbt, gsio, gsio_intr, test, 0, "int");
SDT_PROBE_ARGTYPE(fbt, gsio, gsio_intr, test, 1, "int");

...
static void
gsio_intr(void *varg) {
...
    istat = g_lcr_inl(sc, PLX_INTCSR);
...
        SDT_PROBE(fbt, gsio, gsio_intr, test, istat, 0, 0, 0, 0);

> In
> http://svn.freebsd.org/viewvc/base/user/netchild/linuxulator-dtrace/s
>rc/sys/compat/linux/linux_emul.c?revision=185383&view=markup I have
> code which worked at least at some point in time when loaded as a
> KLD.

Hmm OK, this is on a 7.x system which doesn't have any SDT* stuff in the 
linuxlator (except for FBT probes)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090820/71650b39/attachment.pgp


More information about the freebsd-hackers mailing list