Date: Fri, 28 Nov 2008 15:59:23 +0100 From: Ivan Voras <ivoras@freebsd.org> To: freebsd-current@freebsd.org Subject: Re: HOWTO in wiki: adding custom dtrace probes in the kernel Message-ID: <ggp10c$pdt$1@ger.gmane.org> In-Reply-To: <20081128154514.82247fe47bn83lkw@webmail.leidinger.net> References: <20081128154514.82247fe47bn83lkw@webmail.leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBE54A76B28CAAB2C5916EA5B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alexander Leidinger wrote: > Hi, >=20 > while working on adding dtrace probes to the linuxulator, I thought it > may be interesting for some people to know how to do this, so I added > some text/examples into the wiki how to add static dtrace probes in the= > kernel: > http://wiki.freebsd.org/HOWTO-dtrace-sdt >=20 > If you are interested in the great debugging possibilities of dtrace, > don't be afraid to add some probes to the kernel. It's cheap and easy. Great, thank you! I have some questions about the document: Can you document a bit more the construction of the probe: SDT_PROBE_DEFINE(foobar, source_file1, foo, entry); SDT_PROBE_ARGTYPE(foobar, source_file1, foo, entry, 0, "int"); SDT_PROBE_ARGTYPE(foobar, source_file1, foo, entry, 1, "const char *"); SDT_PROBE_DEFINE(foobar, source_file1, foo, return); SDT_PROBE_ARGTYPE(foobar, source_file1, foo, return, 0, "int"); What is the meaning of "source_file1" and "foo"? SDT_PROBE_DEFINE(foobar, source_file2, bar, entry); SDT_PROBE_DEFINE(foobar, source_file2, bar, my_error_condition_name); SDT_PROBE_DEFINE(foobar, source_file2, bar, return); Here: what is my_error_condition_name? SDT_PROBE(foobar, source_file1, foo, entry, a, b, 0, 0, 0); Here: why are the last three arguments zeroes? From the context it looks like it should be possible to trace an arbitrary number of data - here a,b. Is the number of arguments implicitly constructed from the probe definition (STD_PROBE_ARGTYPE(...0...), STD_PROBE_ARGTYPE(...1...))? --------------enigBE54A76B28CAAB2C5916EA5B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJMAdMldnAQVacBcgRAvKqAJ0axsx/eUei6mCfTuYEfIaLacdweQCgpcvJ HBpEOvFTqIv+bW31wtgFZlo= =TIGu -----END PGP SIGNATURE----- --------------enigBE54A76B28CAAB2C5916EA5B--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ggp10c$pdt$1>