Revision: 1211
Author: [email protected]
Date: Mon May 3 14:06:40 2010
Log: Update docs for savesrc option and string eval processing.
Tweaks to HACKING.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1211
Modified:
/trunk/HACKING
/trunk/lib/Devel/NYTProf.pm
=======================================
--- /trunk/HACKING Wed Apr 21 06:25:45 2010
+++ /trunk/HACKING Mon May 3 14:06:40 2010
@@ -363,6 +363,7 @@
probably less useful from the users perspective.
Fixing that part is easy but handling incl/excl time needs more thought.
+For xsubs and opcodes that call perl subs:
In the subroutine prologue that currently lists where the sub was called
from,
for xsubs & opcodes, add a list of subs that it called (typically none).
That would be handy because currently calls from xsubs & opcodes appear in
the
@@ -383,6 +384,7 @@
(or, say, DBIx::Class) to return relevant data. Would also provide another
route for other data sources (languages/tools) to be included in a report.
Could also simplify: comparing profiles, merging profiles, ...
+Also 'pipelines' of plugin db-to-db transformations could be developed.
Any volunteers to explore writing an nytprofimport for SQLite?
Option to add sub call and return events into the data file as they happen.
@@ -391,11 +393,10 @@
For eval fid reports:
- Add header with link to location of the invoking string eval
- Add links to 'sibling' evals
-- fix sub caller info to not rollup over evals
-- merge string evals which have identical src and invoking location
-- fix inconsistency in results of href_for_*() subs
- Add eval information (evals and time) to file summary header
+Fix inconsistency in results of href_for_*() subs
+
Make generation of call graph .dot files optional and/or optimize to make
faster
String evals could/should be tied into the subroutine profiler.
=======================================
--- /trunk/lib/Devel/NYTProf.pm Mon Apr 26 05:45:51 2010
+++ /trunk/lib/Devel/NYTProf.pm Mon May 3 14:06:40 2010
@@ -393,21 +393,21 @@
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.
-=head2 savesrc=1
-
-Save 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
original
-source code files available. So it also insulates you from later changes to
-those files that would normally make the reports out of sync with the data.
-
-By default NYTProf saved some source code: 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. (Currently string eval source code isn't available
in
-the reports. Patches welcome.)
-
-If you're using perl 5.10.0 or 5.8.8 (or earlier) then you need to also
enable
-the C<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.
+=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.)
+
+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.
=head2 slowops=N
@@ -619,23 +619,20 @@
(eval 1047)[(eval 93)[/foo/bar.pm:42]:17]
-NYTProf currently edits the string eval names to 'normalize' the eval
sequence
-number to 0. This may change in future.
-
=head3 Collapsing
Some applications execute a great many string eval statements. If NYTProf
generated
a report page for each one it would not only slow report generation but
also
make the overall report less useful by scattering performance data too
widely.
On the other hand, being able to see the actual source code executed by an
-eval, along with the timing details, is often very useful.
+eval, along with the timing details, is often I<very> useful.
To try to balance these conflicting needs, NYTProf currently I<collapses
uninteresting string eval siblings>.
What does that mean? Well, for each source code line that executed any
string
evals NYTProf first gathers the corresponding eval 'files' (the siblings)
into groups.
-Lines containing a string eval statement that only executes once aren't
affected.
+Lines containing a string eval statement that only executed once aren't
affected.
The groups are keyed by source code (if available) and whether any
subroutines
were defined or any nested string evals were executed.
@@ -654,11 +651,12 @@
Care should be taken when interpreting the report annotations associated
with a
string eval statement. Normally the report annotations embedded into the
source code related to timings from the I<subroutine> profiler. This isn't
-(currently) true of annotations for string eval statements. This makes a
-significant different if the eval defines any subroutines that get called
I<after>
-the eval has returned. Because the time shown for a string eval is based
on the
-I<statement> times it will include time spent executing statements within
the
-subs defined by the eval.
+(currently) true of annotations for string eval statements.
+
+This makes a significant different if the eval defines any subroutines
that get
+called I<after> the eval has returned. Because the time shown for a string
eval
+is based on the I<statement> times it will include time spent executing
+statements within the subs defined by the eval.
In future NYTProf may involve the subroutine profiler in timings evals and
so
be able to avoid this issue.
--
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]