Date: Sat, 22 Aug 2009 22:43:27 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Alexander Leidinger <Alexander@leidinger.net> Cc: freebsd-hackers@freebsd.org Subject: Re: DTrace probes & klds Message-ID: <200908222243.35466.doconnor@gsoft.com.au> In-Reply-To: <20090821144157.645117jxvao9rmzk@webmail.leidinger.net> References: <200908192331.34507.doconnor@gsoft.com.au> <200908201713.08368.doconnor@gsoft.com.au> <20090821144157.645117jxvao9rmzk@webmail.leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1261833.sVJBPotx2D Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 21 Aug 2009, Alexander Leidinger wrote: > Quoting Daniel O'Connor <doconnor@gsoft.com.au> (from Thu, 20 Aug > 2009 > > 17:13:07 +0930): > > On Thu, 20 Aug 2009, Alexander Leidinger wrote: > >> Quoting Daniel O'Connor <doconnor@gsoft.com.au> (from Wed, 19 Aug > >> 2009 > >> > >> 23:31:33 +0930): > >> > Content-Type: text/plain; > >> > charset=3D"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"); > > I don't think you can define a fbt probe by hand. You can define a > provider on your own via SDT_PROVIDER_DEFINE (in only one > place/file), and then use this provider instead of fbt above. Let's > assume you defined a gsio provider, then the SDT_PROBE_DEFINE could > be > SDT_PROBE_DEFINE(gsio, <unique_part_of_name_of_file>, gsio_intr, > test); Yes, I only wanted to reuse fbt because the handbook says=20 SDT_PROBE_DEFINE doesn't work as a KLD. > If there's only one file, it does not make much sense to add an > unique part of the name of the file, but if you have multiple files > it can be helpful. But this is just an example, for example in GEOM > it would make sense to name the provider "geom", and instead of the > file name use the module name, e.g. mirror, raid3, core/whatever, ... > instead. Hmmm. I have tried that, but not joy :( SDT_PROVIDER_DEFINE(gsio); SDT_PROBE_DEFINE(gsio, main, gsio_intr, test); SDT_PROBE_ARGTYPE(gsio, main, gsio_intr, test, 0, "int"); SDT_PROBE_ARGTYPE(gsio, main, gsio_intr, test, 1, "int"); =2E.. SDT_PROBE(gsio, main, gsio_intr, test, istat, 0, 0, 0, 0); I built my module with WITH_CTF=3D1 and I see that ctfconvert is run,=20 however when I load it the Dtrace providers/providers aren't there. Building it into the kernel works but isn't ideal. Hmm, initially I was building my KLD outside of the tree, however when I=20 build it with buildkernel & load it dtrace -l crashes the system and I=20 can't get a crashdump at the moment.. I'll try again when I can get to=20 the console. =2D-=20 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 --nextPart1261833.sVJBPotx2D Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBKj+7/5ZPcIHs/zowRArLwAJwPpVqVWss6MpMWXxqGRnTm3EJUzQCfb6ZZ ZjNKHKvNQPKzRA+xtAcAzZM= =bgKn -----END PGP SIGNATURE----- --nextPart1261833.sVJBPotx2D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908222243.35466.doconnor>