From owner-freebsd-current@FreeBSD.ORG Fri Nov 28 14:59:39 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B94821065670 for ; Fri, 28 Nov 2008 14:59:39 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 414168FC0A for ; Fri, 28 Nov 2008 14:59:38 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L64od-0003OC-9q for freebsd-current@freebsd.org; Fri, 28 Nov 2008 14:59:31 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Nov 2008 14:59:31 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Nov 2008 14:59:31 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Fri, 28 Nov 2008 15:59:23 +0100 Lines: 63 Message-ID: References: <20081128154514.82247fe47bn83lkw@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBE54A76B28CAAB2C5916EA5B" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.18 (X11/20081125) In-Reply-To: <20081128154514.82247fe47bn83lkw@webmail.leidinger.net> X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: HOWTO in wiki: adding custom dtrace probes in the kernel X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2008 14:59:39 -0000 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--