Date: Tue, 20 Dec 2016 13:44:06 +0100 From: Domagoj Stolfa <domagoj.stolfa@gmail.com> To: Hiroki Sato <hrs@allbsd.org> Cc: freebsd-arch@FreeBSD.org, adrian.chadd@gmail.com Subject: RFC: DTrace probes for debugging or testing in userland programs Message-ID: <20161220124406.GA1713@freebsd-laptop> In-Reply-To: <9887B4D9-A336-498D-ADDE-E683B0DEC2E8@allbsd.org> References: <20161220.043646.1181938468712455328.hrs@allbsd.org> <CAJ-Vmon3%2BjMyfgBcVORyMoXX3JEAFCWtK2VPo9wWLN2hsS%2BrNA@mail.gmail.com> <20161219204719.GE65993@freebsd-laptop> <20161220.060542.16356944875657261.hrs@allbsd.org> <20161219215425.GB42198@freebsd-laptop> <9887B4D9-A336-498D-ADDE-E683B0DEC2E8@allbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, > No. A single dtrace process can catch > fired probes of multiple processes if you want. >=20 > Filtering probes or the results from probes > is things which should be done in the > D script level, not in the target binary, > in the case of DTrace. My proposal does > not cover how to use the probes. It just > provides probes and a sample script to > reproduce the (almost) same results with > printf() debug logging. The big difference > is that a developer can use these probes > for a more complex debug script and/or > regression test script because the > probes can carry data structures in > question, not just a string. I suppose this comes down to a way that you want to implement this. Using the SDT provider would require you to attach to the probes using a D script to perform simple logging, and additional scripts in order to do more complex operations(such as quantize certain arguments that you're getting in during that log and what not). Eventhough your original proposal doesn't cover using those probes, I'm still puzzled as to how you would actually attach to the probes, i.e. would you have a script for each daemon separately or would you create 1 big script, causing it to attach to all the probes created in the separate daemons? There doesn't seem to be a way around having atleast one script in order to make the probes actually fire(that is, call dtrace_probe()). This is one of the reasons why I've argued for a different provider as opposed to SDT. Another thing that could perhaps be done is implement the probes in the daemons and simply attach to them whenever the user needs to attach while leaving the actual logging functionality as is. That way the SDT provider would dynamically link the function call into the daemon whenever one would want to trace for more complex logging(there could be example scripts). The arguments could be documented, allowing for an easy way to write the scripts and have context of what the arguments are. In any case, I would very much like to have access to SDT probes in daemons in order to get full disclosure on what's happening in real time, instead of getting a pre-defined log that I would have to post-process, and would like to thank you for your efforts in doing this. --=20 Best regards, Domagoj Stolfa. --liOOAslEiF7prFVr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEHQB+y96lmmv+IXofwxT+ikb0YU4FAlhZJ5UACgkQwxT+ikb0 YU4KPwf/WQaTWF+RctK3X2dK3cVjhWT/v+qUgRxQZRB6tA0EG/u8aTrcYZdV7jjy aHRQBWWUbXCv5jRqLu6iztpNsiwchgFRfW39bVLyg5LsJihCT9QghTskvKUt0tvO lp8b9CvrbqQW5HdFAfHm18Zhu4xR+5BD0SFu7qMRwl7Hg1hVGwt34KAPTwl9mj8e bCvn+xCtQWolSCIfJEk1TMMUV90hkGX4iTNGTyusZPstzTcc2tpSORGWRnb8PJpZ 2y4R8xQt9Rv9X+u01FEbmIvofQaLpVSFya1QTJ0OyYuJ0x9xg2cWPRYoEwCn+uOb zNugFLwXx4rkR1JBgocZ3tRWuUxtGA== =pOaZ -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161220124406.GA1713>
