This I didn’t even bother to notice – So bit of a noob error.
If you check the WhatsNewInLeopard page over at macosforge – you can see they already built in the patch from the Joyent guys.
I should really have looked before embarking on doing the patch myself.
However – gave me a good insight into how to do it ![]()
I also did a quick check and noticed that Python also has it all compiled in too – shame the entry/exit names aren’t the same as the one on Python on Solaris though. They also haven’t included the PHP module that exists (and I have made work on OSX) so you can still grab that on this site.


Hi,
I’m just trying out DTrace on Leopard, but there isn’t any Python providers, except for the evaluator entries (PyEval_EvalFrameEx:entry). I was expecting to see function-entry etc. providers.
Does Python have function-entr on your system?
I might have some problems with Python versions, as I upgraded from Tiger, which had MacPython 2.5 installed. Could you print Python version and build, plus all Python DTrace providers.
PS: Provider might be the wrong term, please forgive me for that, I’m a DTrace newbie.
–V
Python on Leopard has the evaluator entries which are all there really is. On Solaris it had more, but they weren’t actually needed, if I remember correctly.
However – I think the Python in OSX is broken in that respect. Cos I can’t get the line numbers out. I can get method name (arg1), filename (arg2) but not the line number.
For me arg0 is the filename, arg1 is the parent of the function called and arg2 is the line number.
It’s a bit odd that it shows the parent and not the actual function being called.
Could you provide a short example of how you’re calling Dtrace? Dtrace -l doesn’t show me any of the Joyent probes and trying to run the example scripts in /Dev…/Examples/Ruby/DTrace yields:
“probe description ruby*:::function-entry does not match any probes”
18698 ruby6202 libruby.1.dylib rb_call0 function-entry
18699 ruby6202 libruby.1.dylib rb_call0 function-return
18700 ruby6202 libruby.1.dylib garbage_collect gc-begin
18701 ruby6202 libruby.1.dylib garbage_collect gc-end
18702 ruby6202 libruby.1.dylib rb_eval line
18703 ruby6202 libruby.1.dylib rb_obj_alloc object-create-done
18704 ruby6202 libruby.1.dylib rb_obj_alloc object-create-start
18705 ruby6202 libruby.1.dylib garbage_collect object-free
18706 ruby6202 libruby.1.dylib rb_longjmp raise
18707 ruby6202 libruby.1.dylib rb_eval rescue
18708 ruby6202 libruby.1.dylib ruby_dtrace_probe ruby-probe
(You have to be using Ruby that comes with Leopard – the one installed with Macports might be in your path first)
And Ruby has to be running for the probes to show up.