On Wed, Mar 04, 2009 at 08:37:18AM -0500, Martin J Evans via RT wrote:
> NYTPROF=trace=2:blocks=0 perl -d:NYTProf -e 'use POSIX;' >x.x 2>&1
> NYTProf pid 8902: first statement line 1 of -e at -e line 1.
> New fid 1 (after 0:1 ) 2 e0:0 -e , with src
> New fid 2 (after 1:7 ) 2 e0:0
> /usr/lib/perl5/5.8.8/i386-linux-thread-multi/POSIX.pm
There's POSIX.pm being loaded as fid 2.
> New fid 5 (after 3:159 ) 2 e0:0
> /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/POSIX/autosplit.ix
> New fid 6 (after 3:961 ) 2 e0:0 ../../lib/POSIX.pm /tmp/t/../../lib/POSIX.pm
Looks like those two are both artifacts of AutoLoader.
> Sub POSIX::__ANON__[/usr/lib/perl5/5.8.8/i386-linux-thread-multi/POSIX.pm:48]
> fid 2 lines 48..48
> Sub POSIX::load_imports fid 6 lines 743..958
I think that gives me enough to go on. The problem is the "#line ..."
directive generated by AutoLoader. Here's errno.al, for example:
# NOTE: Derived from ../../lib/POSIX.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package POSIX;
#line 120 "../../lib/POSIX.pm (autosplit into
../../lib/auto/POSIX/errno.al)"
sub errno {
usage "errno()" if @_ != 0;
$! + 0;
}
# end of POSIX::errno
1;
This is enough to reproduce it:
perl -d:NYTProf -e 'use POSIX; errno()'
nytprofhtml
NYTProf needs to get smarter about noticing 'autosplit' and reverse
engineering the appropriate path - which should match an already loaded
fid (umm, maybe that fact can help simplify the implementation).
Anyway, patches welcome!
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]
-~----------~----~----~----~------~----~------~--~---