Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the devel-nytprof CPAN distribution.

Report information
The Basics
Id: 60950
Status: resolved
Priority: 0/
Queue: devel-nytprof

People
Owner: Nobody in particular
Requestors: eugene.toropov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: support for Coro
Date: Wed, 1 Sep 2010 23:13:17 +0400
To: <bug-devel-nytprof [...] rt.cpan.org>
From: "Eugene Toropov" <eugene.toropov [...] gmail.com>
Download (untitled) / with headers
text/plain 330b
Greetings, We have just tried to profile our application that uses Coro package and got an error: NYTProf panic: stack is confused, giving up! Segmentation fault I understand that it's not so easy to add support of another low level implementation of threads, but still hope it's possible. Thank you in advance. Cheers Eugene.
Download (untitled) / with headers
text/html 1001b
CC: develnytprof-dev [...] googlegroups.com
Subject: Re: [rt.cpan.org #60950] support for Coro
Date: Thu, 2 Sep 2010 10:32:58 +0100
To: Eugene Toropov via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
Download (untitled) / with headers
text/plain 752b
On Wed, Sep 01, 2010 at 03:15:54PM -0400, Eugene Toropov via RT wrote: Show quoted text
> Transaction: Ticket created by eugene.toropov@gmail.com > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60950 > > > Greetings, > > We have just tried to profile our application that uses Coro package and got an error: > NYTProf panic: stack is confused, giving up! > Segmentation fault
I'm not surprised. Show quoted text
> I understand that it's not so easy to add support of another low level > implementation of threads, but still hope it's possible. Thank you in > advance.
Realistically it's not going to happen anytime soon, and not without much help from the Coro developers. Your best bet is to submit a bug report to Coro asking for them to work with NYTProf devs. Tim.
Subject: Re: [rt.cpan.org #60950] support for Coro
Date: Tue, 7 Sep 2010 12:18:25 +0400
To: <bug-devel-nytprof [...] rt.cpan.org>
From: "Eugene Toropov" <eugene.toropov [...] gmail.com>
Download (untitled) / with headers
text/plain 1.1k
Hi Tim, I've had a discussion on this subject with Marc Lehmann and here is what he wrote to me: <schmorp:#anyevent> well, all they need to do is use the current thread as extra index into their data structures <schmorp:#anyevent> $NYTPROFDATA{$Coro::current+0} for example Cheers Eugene Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=60950 > > > On Wed, Sep 01, 2010 at 03:15:54PM -0400, Eugene Toropov via RT wrote:
>> Transaction: Ticket created by eugene.toropov@gmail.com >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60950 > >> >> Greetings, >> >> We have just tried to profile our application that uses Coro package and >> got an error: >> NYTProf panic: stack is confused, giving up! >> Segmentation fault
> > I'm not surprised. >
>> I understand that it's not so easy to add support of another low level >> implementation of threads, but still hope it's possible. Thank you in >> advance.
> > Realistically it's not going to happen anytime soon, and not without > much help from the Coro developers. Your best bet is to submit a bug > report to Coro asking for them to work with NYTProf devs. > > Tim. >
Subject: Re: [rt.cpan.org #60950] support for Coro
Date: Sun, 12 Sep 2010 11:37:01 +0100
To: Eugene Toropov via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
Download (untitled) / with headers
text/plain 548b
On Tue, Sep 07, 2010 at 04:19:43AM -0400, Eugene Toropov via RT wrote: Show quoted text
> > I've had a discussion on this subject with Marc Lehmann and here is what he > wrote to me: > > <schmorp:#anyevent> well, all they need to do is use the current thread as > extra index into their data structures > <schmorp:#anyevent> $NYTPROFDATA{$Coro::current+0} for example
So essentially we need to support threading first. That's unlikely to get done by me anytime soon, but it would be reasonably straightforward for someone else to do. Volunteers welcome! Tim.
CC: Tim.Bunce [...] pobox.com, develnytprof-dev [...] googlegroups.com, bug-devel-nytprof [...] rt.cpan.org
Subject: Re: [rt.cpan.org #60950] Support for Coro / Threads
Date: Fri, 24 Sep 2010 11:23:40 +0100
To: Roger Picton <roger.picton [...] mypostoffice.co.uk>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
Download (untitled) / with headers
text/plain 1.8k
On Thu, Sep 23, 2010 at 05:12:06PM +0100, Roger Picton wrote: Show quoted text
> Tim:
Hello Roger. Show quoted text
> 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. Show quoted text
> 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. Show quoted text
> 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. Show quoted text
> 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.
RT-Send-CC: Tim.Bunce [...] pobox.com
Download (untitled) / with headers
text/plain 260b
I've created an open quest on Play Perl for this: http://play-perl.org/quest/5164001d0d7965996100005a (This is the most important feature missing from Devel::NYTProf for me and our team, but I don't have time to do it myself.) Let's see if anyone picks it up.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.