Revision: 901 Author: tim.bunce Date: Sat Nov 14 13:27:29 2009 Log: Updated ops for 5.10 (will need to add #ifdefs for earlier versions ) Removed rand and srand (because they'll never be slow enoh to care about because they don't use /dev/random) Added say and substcont Stubbed out OP_SUBSTCONT for this commit
http://code.google.com/p/perl-devel-nytprof/source/detail?r=901 Modified: /trunk/Makefile.PL /trunk/NYTProf.xs /trunk/slowops.h /trunk/t/test16.rdt ======================================= --- /trunk/Makefile.PL Wed Nov 11 02:51:49 2009 +++ /trunk/Makefile.PL Sat Nov 14 13:27:29 2009 @@ -196,8 +196,9 @@ # not substcont yet - needs more work XXX slowops:: perl -MOpcode=opset_to_ops,opset \ + -e 'require v5.10.0; # only regenerate with 5.10+ to get all ops' \ -e 'print "/* generated by Makefile.PL for perl $$] */\n";' \ - -e 'my @ops = opset_to_ops(opset(":base_io",":filesys_read",":filesys_write",":filesys_open",":sys_db",":subprocess",":others",qw(match subst substcont qr regcomp prtf crypt chdir flock ioctl socket getpeername ssockopt bind connect listen accept shutdown gsockopt getsockname sleep sort pack unpack dofile syscall dump chroot dbmopen dbmclose lock sselect select), qw(!fileno !require !fork !substcont)));' \ + -e 'my @ops = opset_to_ops(opset(":base_io",":filesys_read",":filesys_write",":filesys_open",":sys_db",":subprocess",":others",qw(match subst substcont qr regcomp prtf crypt chdir flock ioctl socket getpeername ssockopt bind connect listen accept shutdown gsockopt getsockname sleep sort pack unpack dofile syscall dump chroot dbmopen dbmclose lock sselect select), qw(!fileno !require !fork)));' \ -e 'print "PL_ppaddr[OP_\U$$_\E] = pp_slowop_profiler;\n" for sort @ops;' \ > slowops.h ======================================= --- /trunk/NYTProf.xs Wed Nov 11 01:59:33 2009 +++ /trunk/NYTProf.xs Sat Nov 14 13:27:29 2009 @@ -2675,6 +2675,7 @@ || (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_INIT_cv || sub_sv == DB_fin_cv)) /* don't profile other kids of goto */ || (op_type==OP_GOTO && !(SvROK(sub_sv) && SvTYPE(SvRV(sub_sv)) == SVt_PVCV)) + || (op_type==OP_SUBSTCONT) /* XXX not handled yet */ ) { return run_original_op(op_type); } ======================================= --- /trunk/slowops.h Wed Nov 11 02:05:00 2009 +++ /trunk/slowops.h Sat Nov 14 13:27:29 2009 @@ -1,4 +1,4 @@ -/* generated by Makefile.PL for perl 5.008006 */ +/* generated by Makefile.PL for perl 5.011001 */ PL_ppaddr[OP_ACCEPT] = pp_slowop_profiler; PL_ppaddr[OP_BACKTICK] = pp_slowop_profiler; PL_ppaddr[OP_BIND] = pp_slowop_profiler; @@ -95,7 +95,6 @@ PL_ppaddr[OP_PRINT] = pp_slowop_profiler; PL_ppaddr[OP_PRTF] = pp_slowop_profiler; PL_ppaddr[OP_QR] = pp_slowop_profiler; -PL_ppaddr[OP_RAND] = pp_slowop_profiler; PL_ppaddr[OP_RCATLINE] = pp_slowop_profiler; PL_ppaddr[OP_READ] = pp_slowop_profiler; PL_ppaddr[OP_READDIR] = pp_slowop_profiler; @@ -106,6 +105,7 @@ PL_ppaddr[OP_RENAME] = pp_slowop_profiler; PL_ppaddr[OP_REWINDDIR] = pp_slowop_profiler; PL_ppaddr[OP_RMDIR] = pp_slowop_profiler; +PL_ppaddr[OP_SAY] = pp_slowop_profiler; PL_ppaddr[OP_SEEK] = pp_slowop_profiler; PL_ppaddr[OP_SEEKDIR] = pp_slowop_profiler; PL_ppaddr[OP_SELECT] = pp_slowop_profiler; @@ -126,12 +126,12 @@ PL_ppaddr[OP_SORT] = pp_slowop_profiler; PL_ppaddr[OP_SPROTOENT] = pp_slowop_profiler; PL_ppaddr[OP_SPWENT] = pp_slowop_profiler; -PL_ppaddr[OP_SRAND] = pp_slowop_profiler; PL_ppaddr[OP_SSELECT] = pp_slowop_profiler; PL_ppaddr[OP_SSERVENT] = pp_slowop_profiler; PL_ppaddr[OP_SSOCKOPT] = pp_slowop_profiler; PL_ppaddr[OP_STAT] = pp_slowop_profiler; PL_ppaddr[OP_SUBST] = pp_slowop_profiler; +PL_ppaddr[OP_SUBSTCONT] = pp_slowop_profiler; PL_ppaddr[OP_SYMLINK] = pp_slowop_profiler; PL_ppaddr[OP_SYSCALL] = pp_slowop_profiler; PL_ppaddr[OP_SYSOPEN] = pp_slowop_profiler; ======================================= --- /trunk/t/test16.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test16.rdt Sat Nov 14 13:27:29 2009 @@ -23,11 +23,14 @@ fid_fileinfo 1 sub main::BEGIN 6-6 fid_fileinfo 1 sub main::CORE:match 0-0 fid_fileinfo 1 sub main::CORE:print 0-0 +fid_fileinfo 1 sub main::CORE:say 0-0 fid_fileinfo 1 sub main::RUNTIME 1-1 fid_fileinfo 1 sub main::bar 20-27 fid_fileinfo 1 sub main::foo 8-18 fid_fileinfo 1 call 11 main::CORE:match [ 2 0 0 0 0 0 0 main::foo ] +fid_fileinfo 1 call 11 main::CORE:say [ 1 0 0 0 0 0 0 main::foo ] fid_fileinfo 1 call 14 main::CORE:match [ 1 0 0 0 0 0 0 main::foo ] +fid_fileinfo 1 call 14 main::CORE:say [ 1 0 0 0 0 0 0 main::foo ] fid_fileinfo 1 call 22 main::CORE:match [ 3 0 0 0 0 0 0 main::bar ] fid_fileinfo 1 call 22 main::CORE:print [ 2 0 0 0 0 0 0 main::bar ] fid_fileinfo 1 call 30 main::foo [ 1 0 0 0 0 0 0 main::RUNTIME ] @@ -60,6 +63,9 @@ sub_subinfo main::CORE:match called_by 1 22 [ 3 0 0 0 0 0 0 main::bar ] sub_subinfo main::CORE:print [ 1 0 0 2 0 0 0 0 ] sub_subinfo main::CORE:print called_by 1 22 [ 2 0 0 0 0 0 0 main::bar ] +sub_subinfo main::CORE:say [ 1 0 0 2 0 0 0 0 ] +sub_subinfo main::CORE:say called_by 1 11 [ 1 0 0 0 0 0 0 main::foo ] +sub_subinfo main::CORE:say called_by 1 14 [ 1 0 0 0 0 0 0 main::foo ] sub_subinfo main::RUNTIME [ 1 1 1 0 0 0 0 0 ] sub_subinfo main::bar [ 1 20 27 2 0 0 0 0 ] sub_subinfo main::bar called_by 1 32 [ 1 0 0 0 0 0 0 main::RUNTIME ] -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected]
