Revision: 1295
Author: [email protected]
Date: Thu Jun 10 02:26:31 2010
Log: Clarify perl version requirements for seeing eval source code. RT#58283
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1295
Modified:
/trunk/lib/Devel/NYTProf/ReadStream.pm
/trunk/lib/Devel/NYTProf/Reader.pm
/trunk/lib/Devel/NYTProf.pm
=======================================
--- /trunk/lib/Devel/NYTProf/ReadStream.pm Tue Jun 1 06:18:12 2010
+++ /trunk/lib/Devel/NYTProf/ReadStream.pm Thu Jun 10 02:26:31 2010
@@ -188,9 +188,10 @@
=item SRC_LINE => $fid, $line, $text
-Used to capture the source code of the program and modules profiled.
-Currently only used for C<< perl -e '...' >> and C<< perl - >> runs
-and requires use of the C<use_db_sub=1> option.
+Used to reproduce the source code of the files and evals profiled.
+Requires perl 5.8.9+ or 5.10.1+ or 5.12 or later. For earlier versions of
perl
+the source code of C<< perl -e '...' >> and C<< perl - >> 'files' is
available
+if the C<use_db_sub=1> option was used when profiling.
=item PID_END => $pid, $end_time
=======================================
--- /trunk/lib/Devel/NYTProf/Reader.pm Thu Jun 10 01:47:15 2010
+++ /trunk/lib/Devel/NYTProf/Reader.pm Thu Jun 10 02:26:31 2010
@@ -351,7 +351,7 @@
$msg = "No source code available for synthetic (fake) file
$filestr.",
}
elsif ($fi->is_eval) {
- $msg = "No source code available for string eval
$filestr.\nSee savesrc option in documentation.",
+ $msg = "No source code available for string eval
$filestr.\nYou probably need to use a more recent version of perl. See
savesrc option in documentation.",
}
elsif ($filestr =~ m{^/loader/0x[0-9a-zA-Z]+/}) {
# a synthetic file name that perl assigns when reading
@@ -359,7 +359,7 @@
$msg = "No source code available for 'file' loaded via
CODE reference in \...@inc.\nsee savesrc option in documentation.",
}
elsif (not $fi->is_file) {
- $msg = "No source code available for
non-file '$filestr'.\nSee savesrc option in documentation.",
+ $msg = "No source code available for
non-file '$filestr'.\nYou probably need to use a more recent version of
perl. See savesrc option in documentation.",
}
else {
=======================================
--- /trunk/lib/Devel/NYTProf.pm Mon Jun 7 15:14:07 2010
+++ /trunk/lib/Devel/NYTProf.pm Thu Jun 10 02:26:31 2010
@@ -393,22 +393,28 @@
compiled before NYTProf was loaded. So using use_db_sub=1 can be useful in
cases where you can't load the profiler early in the life of the
application.
+Another side effect of C<use_db_sub=1> is that it enables recording of the
+source code of the C<< perl -e '...' >> and C<< perl - >> input for old
+versions of perl. See also L</savesrc=0>.
+
=head2 savesrc=0
Disable the saving of source code.
-By default NYTProf saves a copy of all source code, including string evals,
-into the profile data file. This makes the file self-contained, so the
-reporting tools no longer depend on having the unmodified source code files
-available.
-(If you're using perl 5.10.0 or 5.8.8 (or earlier) then you need to also
enable
-the L</use_db_sub=1> option otherwise perl doesn't make the source code
-available to NYTProf. Perl 5.8.9 and 5.10.1+ don't require that.)
+By default NYTProf saves a copy of all source code into the profile data
file.
+This makes the file self-contained, so the reporting tools no longer
depend on
+having the unmodified source code files available.
With C<savesrc=0> some source code is still saved: the arguments to the
C<perl -e> option, the script fed to perl via STDIN when using C<perl ->,
and the source code of string evals.
+Saving the source code of string evals requires perl version 5.8.9+,
5.10.1+,
+or 5.12 or later.
+
+Saving the source code of the C<< perl -e '...' >> or C<< perl - >> input
+requires either a recent perl version, as above, or setting the
L</use_db_sub=1> option.
+
=head2 slowops=N
Profile perl opcodes that can be slow. These include opcodes that make
system
--
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]