[issue4111] Add Systemtap/DTrace probes
Changes by Brett Hoerner bretthoer...@gmail.com: -- nosy: -bretthoerner ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add DTrace probes
Brett Hoerner [EMAIL PROTECTED] added the comment: On Wed, Nov 12, 2008 at 9:31 PM, Skip Montanaro [EMAIL PROTECTED] wrote: I see the reference to Apple in your original post, but can't find anything related to dtrace python starting from the URL you gave. Do you have something more specific? http://www.opensource.apple.com/darwinsource/10.5.5/python-30.1.2/ That isn't Python 3.0, that's what I guess they call Python Apple Version 30? Anyways, it's their Python 2.5.1 and their patches against it are actually ed scripts, contained in fix/ That's where my patch comes from, it's just changing the .ed scripts to a patch and applying it against 2.6 At this point Jeff's code does a fair bit more than simply tracing the CALL_FUNCTION opcode but needs some work with the other CALL_FUNCTION_* opodes. It also has some obmalloc tracing which I've not yet tested. I would have thought Apple would more heavily instrument the interpreter than it appears they have. Sun has released a patch against DTrace that probes more than just function calls also. At least, it provides line number and some other information, http://cvs.opensolaris.org/source/xref//jds/spec-files/trunk/patches/Python-07-dtrace.diff I couldn't figure out why it broke the compile on OS X though, and could only get it working on Solaris. There's another problem (I think) with DTrace probes ... if the Apple guys release Apple-Probe-Python.d and the Sun guys release Sun-Probe-Python.d (just two scripts) and we setup our probes differently, one or both will fail (because one may expect a probe for foo while another expects a probe for bar). Kind of sucks, considering Sun was first and Apple chose to probe Python differently. Now we have to pick one or make a 3rd... I could be very mistaken here, though. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add DTrace probes
Brett Hoerner [EMAIL PROTECTED] added the comment: They have released the changes, that's what my patch (attached to the issue) is based on. It's working, it just needs to be cleaned up (it will fail, I believe, for people on systems without DTrace - as I said I'm not very familiar with Makefiles). You can use it now against 2.6 and probably with very few changes against 2.5. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add DTrace probes
New submission from Brett Hoerner [EMAIL PROTECTED]: It would be great if the main Python distribution supported DTrace on (Open)Solaris / FreeBSD / OS X. I've attached a patch against 2.6 that instruments function calls. It's from the ed scripts included in Apple's Python distribution: http://developer.apple.com/opensource/index.html (PSF License) It is imperfect because I wasn't sure how to do the equivalent of IFDEF in the Makefile.pre.in, as you can see this patch will make ceval.o depend on pydtrace.h, which depends on having a local `dtrace` command. The rest of the patch properly uses IFDEFs. -- components: Build, Installation files: python-2.6-dtrace.diff keywords: patch messages: 74670 nosy: bretthoerner severity: normal status: open title: Add DTrace probes type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file11772/python-2.6-dtrace.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com