develooper Front page | perl.perl5.porters | Postings from August 2010

Re: [perl #77476] Devel::DProf doesn't show line number of anonymous subs

Thread Previous
From:
Nicholas Clark
Date:
August 28, 2010 03:14
Subject:
Re: [perl #77476] Devel::DProf doesn't show line number of anonymous subs
Message ID:
20100828101435.GY48531@plum.flirble.org
On Fri, Aug 27, 2010 at 03:40:08PM -0700, andrew @ pimlott. net wrote:

> Devel::DProf doesn't include the line numbers of anonymous subs.  That's a
> problem for me, because I use a lot of them.  As a result, I can't identify
> which subs are the problem in my profile.  I found the right place to change
> in DProf.xs and made this test patch:

On Fri, Aug 27, 2010 at 04:03:27PM -0700, Andrew Pimlott wrote:
> Argh, GvLINE doesn't do what I want.  It seems to give something close
> to the line number where the sub was defined, but not exactly.  If this
> information is available, I would be grateful if someone can tell me how
> to get it.

I don't know the right answer to get you what you want.

Also, offhand, I don't know whether Devel::NYTProf include the line numbers of
anonymous subs in its output. If it does, (profiling) problem solved. If it
doesn't, it's a valid feature request, and likely to get implemented as
Devel::NYTProf is under active development.

Nicholas 

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About