On Mar 7, 2009, at 1:12 PM, Tim Bunce wrote:

>
> On Fri, Mar 06, 2009 at 09:47:22AM -0800, Andy Grundman wrote:
>>
>> I need to use savesrc=1 to profile on an embedded platform.  This is
>> running 5.10.0, so I have also enabled use_db_sub=1.  However, no
>> source data is saved to the .out file.  I tried it on a 5.8.8 OSX
>> system as well, and neither one appears to save the source.  Am I
>> doing something wrong?
>
> Seems to work for me (with 5.10.0)...
>
> Not enabled:
>
> $ NYTPROF=trace=2:savesrc=0:use_db_sub=1 perl
> -d:NYTProf -e 'use overload;' 2>&1 | grep 'New fid' && ls -l  
> nytprof.out
> New fid  1 (after  0:1   ) 2 e0:0 -e , with src
> New fid  2 (after  1:138 ) 2 e0:0 /usr/local/perl510-pure/lib/5.10.0/ 
> overload.pm
> New fid  3 (after  2:3   ) 2 e0:0 /usr/local/perl510-pure/lib/5.10.0/ 
> warnings/register.pm
> New fid  4 (after  3:9   ) 2 e0:0 /usr/local/perl510-pure/lib/5.10.0/ 
> warnings.pm
> -rw-r-----  1 timbo  timbo  1220  7 Mar 18:11 nytprof.out
>
> Enabled:
>
> $ NYTPROF=trace=2:savesrc=1:use_db_sub=1 perl
> -d:NYTProf -e 'use overload;' 2>&1 | grep 'New fid' && ls -l
> nytprof.outNew fid  1 (after  0:1   ) 2 e0:0 -e , with src
> New fid  2 (after  1:138 ) 2 e0:0 /usr/local/perl510-pure/lib/5.10.0/ 
> overload.pm , with src
> New fid  3 (after  2:3   ) 2 e0:0 /usr/local/perl510-pure/lib/5.10.0/ 
> warnings/register.pm , with src
> New fid  4 (after  3:9   ) 2 e0:0 /usr/local/perl510-pure/lib/5.10.0/ 
> warnings.pm , with src
> -rw-r-----  1 timbo  timbo  7736  7 Mar 18:11 nytprof.out
>
> Note the "with src" in the New fid lines, and the larger output file.

Ah yes, I am able to get source included with your example or with a  
small test script that just loads a few modules.  However I still do  
not get source with a very large app that is setup to exit after  
loading everything.  I will try and narrow it down to a test case,  
although this may be rather difficult...

Here's my output (trace not included as it's very large):

$ NYTPROF=savesrc=0:use_db_sub=1 perl -d:NYTProf slimserver.pl 2>&1 &&  
ls -l nytprof.out
-rw-r--r--  1 andy  andy  810272 Mar  7 14:58 nytprof.out

$ NYTPROF=savesrc=1:use_db_sub=1 perl -d:NYTProf slimserver.pl 2>&1 &&  
ls -l nytprof.out
-rw-r--r--  1 andy  andy  967107 Mar  7 14:59 nytprof.out

It is a bit larger but nowhere near large enough to contain all the  
source compressed (the source is 6MB not including CPAN modules).
Unfortunately I run into another bug trying to run it without  
compression (it dies on a 'use warnings'):

NYTPROF=savesrc=1:use_db_sub=1:compress=0 perl -d:NYTProf  
slimserver.pl 2>&1 && ls -l nytprof.out
fwrite error 2: No such file or directory at /System/Library/Perl/ 
5.8.8/warnings.pm line 134.
BEGIN failed--compilation aborted at /System/Library/Perl/5.8.8/ 
warnings.pm line 134.

Line 134 is:
use Carp ();

Anything helpful I can provide with trace output?

Thanks,
-Andy

--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---

Reply via email to