On Mon, Jun 08, 2009 at 02:51:21PM -0700, Joshua ben Jore wrote: > > On Mon, Jun 8, 2009 at 2:12 PM, Joshua ben Jore<[email protected]> wrote: > > On Mon, Jun 8, 2009 at 12:41 PM, Joshua ben Jore<[email protected]> wrote: > >> Using r759, I'm getting a segmentation fault somewhere during report > >> generation. Anyone else seeing problems? I'm suspecting Tim's recent > >> "(eval 0)" code in r750. Attached a profile. BTW, to test this stuff > >> easier, file names for source can be faked with #line X "XXX" > >> directives in the source. > > Got it. The faked-up file didn't exist hard enough yet. Will commit > later when I have a test.
I suspect that's papering over the cracks (I've just checked in a similar patch). The puzzle is why the fid for "/unknown-eval-invoker" hadn't already been seen. The code in the profiler recurses into get_file_id in order to ensure that that fid gets emitted before the fid that refers to it. And in my tests that's exactly what happens during profiling: Fid 2 is /unknown-eval-invoker (eval 0:0) 0x82 sz0 mt0 Fid 1 is (eval 0) (eval 2:1) 0x22 sz0 mt0 Can you look into that? Tim. > diff --git a/NYTProf.xs b/NYTProf.xs > index c06d451..247a91f 100644 > --- a/NYTProf.xs > +++ b/NYTProf.xs > @@ -3377,6 +3377,8 @@ load_profile_data_from_stream(SV *cb) > /* this eval fid points to the fid that contained > the eval */ > av_store(av, NYTP_FIDi_EVAL_FI, > sv_rvweaken(newSVsv(eval_fi))); > /* the fid that contained the eval has a list of > eval fids */ > + if (!SvROK(eval_fi)) /* autoviv, in particular, > "/unknown-eval-invoker" */ > + sv_setsv(eval_fi, newRV_noinc((SV*)newAV())); > has_evals = *av_fetch((AV *)SvRV(eval_fi), > NYTP_FIDi_HAS_EVALS, 1); > if (!SvROK(has_evals)) /* autoviv */ > sv_setsv(has_evals, newRV_noinc((SV*)newAV())); > > Josh > > > --~--~---------~--~----~------------~-------~--~----~ 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] -~----------~----~----~----~------~----~------~--~---
