Revision: 906 Author: tim.bunce Date: Sun Nov 15 03:25:28 2009 Log: Move already_completed test out of slowop block so it'll also work for Scope::Upper's unwind. (Sadly Scope::Upper still has problems with NYTProf - I'm looking into it.)
http://code.google.com/p/perl-devel-nytprof/source/detail?r=906 Modified: /trunk/NYTProf.xs ======================================= --- /trunk/NYTProf.xs Sat Nov 14 14:49:13 2009 +++ /trunk/NYTProf.xs Sun Nov 15 03:25:28 2009 @@ -2792,18 +2792,20 @@ subr_entry = subr_entry_ix_ptr(this_subr_entry_ix); /* detect wiedness/corruption */ - assert(subr_entry->already_counted < 100); assert(subr_entry->caller_fid < next_fid); + + /* Check if this call has already been counted because the op performed + * a leave_scope(). E.g., OP_SUBSTCONT at end of s/.../\1/ + * or Scope::Upper's unwind() + */ + if (subr_entry->already_counted) { + assert(subr_entry->already_counted < 3); + if (trace_level >= 9) + logwarn("%2d -- already counted\n", subr_entry->subr_prof_depth); + goto skip_sub_profile; + } if (is_slowop) { - /* check if this call has already been counted because the op performed - * a leave_scope(). E.g., OP_SUBSTCONT at end of s/.../\1/; - */ - if (subr_entry->already_counted) { - if (trace_level >= 9) - logwarn("%2d -- already counted\n", subr_entry->subr_prof_depth); - goto skip_sub_profile; - } /* else already fully handled by subr_entry_setup */ } else { -- 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]
