Yusuf Goolamabbas
2008-May-02 14:09 UTC
[dtrace-discuss] How to use perl bindings for dtrace on macosx leopard ?
According to this page, http://www.apple.com/macosx/technology/unix.html In addition, Java, Ruby, Python, and Perl have been extended to support DTrace, providing unprecedented access for monitoring the performance characteristics of those languages. When I do dtrace -l | grep -i perl on MacOSX 10.5.2. I don''t see any perl providers so I am not sure how I could monitor perl scripts via dtrace I looked around on Apple''s opensource website and saw this file in its perl source http://www.opensource.apple.com/darwinsource/10.5.2/perl-51.1.2/ http://www.opensource.apple.com/darwinsource/10.5.2/perl-51.1.2/fix/pldtrace.d Can anybody advise me the steps I need to take in order to dtrace a perl script on MacOSX 10.5.2 ? -- This message posted from opensolaris.org
Chris Andrews
2008-May-02 15:58 UTC
[dtrace-discuss] How to use perl bindings for dtrace on macosx leopard ?
2008/5/2 Yusuf Goolamabbas <yusufg at gmail.com>:> According to this page, > > http://www.apple.com/macosx/technology/unix.html > > In addition, Java, Ruby, Python, and Perl have been extended to support DTrace, providing unprecedented access for monitoring the performance characteristics of those languages. > > When I do dtrace -l | grep -i perl on MacOSX 10.5.2. I don''t see any perl providers so I am not sure how I could monitor perl scripts via dtraceYou need to have a perl process running to see its probes - try this command to see what''s available: $ sudo dtrace -l -n ''perl$target:::'' -c "/usr/bin/perl -e1" ID PROVIDER MODULE FUNCTION NAME 18810 perl94989 libperl.dylib Perl_pp_sort sub-entry 18811 perl94989 libperl.dylib Perl_pp_dbstate sub-entry 18812 perl94989 libperl.dylib Perl_pp_entersub sub-entry 18813 perl94989 libperl.dylib Perl_pp_last sub-return 18814 perl94989 libperl.dylib Perl_pp_return sub-return 18815 perl94989 libperl.dylib Perl_dounwind sub-return 18816 perl94989 libperl.dylib Perl_pp_leavesublv sub-return 18817 perl94989 libperl.dylib Perl_pp_leavesub sub-return You could also look at Devel::DTrace on CPAN, which provides the same probes for an unpatched perl binary. That might be better if you''re using a macports perl, say. Chris.