On Thu, Sep 23, 2010 at 05:12:06PM +0100, Roger Picton wrote: > Tim: Hello Roger.
> Excuse me emailing you directly but I haven't got a login id for the CPAN > bug system (and I'm not sure > whether I'd be allowed to add a comment to this bug even if I had!). Once logged in you can comment on any ticket, and add yourself as a CC on any ticket. > I found the same problem when trying to profile a program which uses Coro. > Since the error message said > "stack is confused" and coroutines tinker with the stack I thought I'd try > switching off subroutine > profiling (subs=0 in the NYTPROF environment variable). When I did that > the profiler worked fine. That's useful to know. I'll add a note to the docs. > I > obviously only got line and block level results in that case, but that was > certainly good enough to help > me identify the hot spots. On the other hand, I presume this ploy > wouldn't work for multiple threads. Per the docs at http://search.cpan.org/~timb/Devel-NYTProf-4.05/lib/Devel/NYTProf.pm#Threads_and_Multiplicity "Meanwhile, profiling is disabled when a thread is created, and NYTProf tries to ignore any activity from perl interpreters other than the first one that loaded it." So, no. Sorry. > For reference I was using ActivePerl 5.12.2.1202 (which includes > Devel::NYTProf 4.04) and Coro 5.23 on > Windows Vista Home Premium SP2. > > Thanks for taking on this excellent profiler! You're welcome. I'd be very supportive of anyone wanting to make NYTProf thread/coro safe. It should be a relatively straightforward and typical process, i.e., create a struct, pass it around, start moving the globals into the struct. That can be an incremental process, each in a separate commit, with the test suite kept passing. Once that work is done, actual thread safety shouldn't be hard to add as a final step. I'm looking for a volunter! Tim. -- 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]
