I''ve ported my additional DTrace probes to blead perl, and have attached a patch. This patch adds **new-sv and del-sv to track Perl allocations, **main-enter and main-exit to show what part of Perl''s execution phase we''re in **load-module-entry and load-module-return to instrument use, require, do. As you can see from the code in op.c, I have not worked out howto get all the desired information from perl yet - the staggering amount of TLA''s is blowing this 1week old Perl hacker''s mind a bit. Any tips and pointers would be appreciated - I''d like to get this merged :) I''ve started to document the probes at http://wikis.sun.com/display/DTrace/perl+Provider Cheers Sven -- Professional Wiki Innovation and Support Sven Dowideit - http://DistributedINFORMATION.com A WikiRing Partner http://wikiring.com -------------- next part -------------- A non-text attachment was scrubbed... Name: SVENsDTRACE_bleadperl.diff Type: text/x-patch Size: 11275 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080215/0b7d4aa2/attachment.bin>
On 15 Feb 2008, at 06:59, Sven Dowideit wrote:> $spitshell >>Makefile <<''!NO!SUBS!'' > -$(DTRACE_O): perldtrace.d > - $(DTRACE) -G -s perldtrace.d -o $(DTRACE_O) $(ndt_obj) > +$(DTRACE_O): perldtrace.d $(DTRACE_H) $(ndt_obj) opmini.o > + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_O) $(ndt_obj) opmini.oI think ndt_obj is everything about from perldtrace.o - so there should be no need to add opmini.o unless I''m missing something. -- Andy Armstrong, Hexten
Heya Andy, As I have understood it, opmini.c is essentially a copy of op.c, and I''ve added the load-module probes to op.c, thus forcing this change. I think I also saw this resolve some issues when turning on the dtrace probes while miniperl is running, but that might have been the the 333201 problem I stumbled over. Sven Andy Armstrong wrote:> On 15 Feb 2008, at 06:59, Sven Dowideit wrote: >> $spitshell >>Makefile <<''!NO!SUBS!'' >> -$(DTRACE_O): perldtrace.d >> - $(DTRACE) -G -s perldtrace.d -o $(DTRACE_O) $(ndt_obj) >> +$(DTRACE_O): perldtrace.d $(DTRACE_H) $(ndt_obj) opmini.o >> + $(DTRACE) -G -s perldtrace.d -o $(DTRACE_O) $(ndt_obj) opmini.o > > I think ndt_obj is everything about from perldtrace.o - so there > should be no need to add opmini.o unless I''m missing something. >-- Professional Wiki Innovation and Support Sven Dowideit - http://DistributedINFORMATION.com A WikiRing Partner http://wikiring.com
On 17 Feb 2008, at 01:27, Sven Dowideit wrote:> Heya Andy, > > As I have understood it, opmini.c is essentially a copy of op.c, and > I''ve added the load-module probes to op.c, thus forcing this change. > I think I also saw this resolve some issues when turning on the > dtrace probes while miniperl is running, but that might have been > the the 333201 problem I stumbled over.Would be good to get to the bottom of whatever problems you saw I think. -- Andy Armstrong, Hexten
the short answer to ''does opmini.c need to be in the creation of the perldtrace.o'' is to apply the following trivial patch, and watch the build fail. Frustratingly, this week I''ve been finding a situation where probes in op.c don''t seem to enable, but the same probe works fine from any other source file. The op.c ones don''t even show up in dtrace -l. Index: op.c ==================================================================--- op.c (revision 127) +++ op.c (working copy) @@ -3811,6 +3811,7 @@ OP *pegop = newOP(OP_NULL,0); #endif + ENTRY_PROBE("Test", "Probe", 12); PERL_ARGS_ASSERT_UTILIZE; if (idop->op_type != OP_CONST) Andy Armstrong wrote:> On 17 Feb 2008, at 01:27, Sven Dowideit wrote: >> Heya Andy, >> >> As I have understood it, opmini.c is essentially a copy of op.c, and >> I''ve added the load-module probes to op.c, thus forcing this change. >> I think I also saw this resolve some issues when turning on the >> dtrace probes while miniperl is running, but that might have been the >> the 333201 problem I stumbled over. > > > Would be good to get to the bottom of whatever problems you saw I think. >