Author: tim.bunce
Date: Sat Jan 3 04:03:28 2009
New Revision: 660
Modified:
trunk/Changes
trunk/HACKING
trunk/NYTProf.xs
trunk/bin/nytprofhtml
Log:
The sub profiler now calls reinit_if_forked() if the statement profiler
(which
normally calls it) isn't running.
Update HACKING file.
Tweak Changes file.
Don't ask tablesorter to perform initial sort on package rollup tables.
Modified: trunk/Changes
==============================================================================
--- trunk/Changes (original)
+++ trunk/Changes Sat Jan 3 04:03:28 2009
@@ -24,7 +24,8 @@
Dramatically increased performance of nytprofhtml
relative to the 2.07 version.
- Summary tables can be sorted by clicking on header columns.
+ Many tables in html reports are sortable by clicking on header columns
+ (requires JavaScript, uses jQuery and tablesorter.js)
Statement timings are now shown as integers in appropriate
units: seconds, milliseconds, microseconds or nanoseconds.
Modified: trunk/HACKING
==============================================================================
--- trunk/HACKING (original)
+++ trunk/HACKING Sat Jan 3 04:03:28 2009
@@ -113,8 +113,9 @@
Add tests with various kinds of blocks and loops (if, do, while, until,
etc).
Add mechanism to specify options inside the .p file, such as
-
# NYTPROF=...
+though this may not be needed if t/20.runtests.t gets dropped
+and the logic moved to a library for traditional t/*.t files to use.
Add mechanism to specify inside the .p file that NYTProf
should not be loaded via the command line. That's needed to test
@@ -325,17 +326,9 @@
Add option to set processor affinity.
-Trace level 1 should show totals fids, subs etc.
-
Index should show eval fids in some form - collapsed per location?
Or just included in the stats for the outer source file.
-Usage of SubInfo merge_in needs to also merge sub_callers info.
-Perhaps restructure sub_callers to hang off sub_subinfo.
-That also avoids the need to duplicate subname.
-
-Check forking when stmts=0.
-
Sub profiler should avoid sv_setpvf(subname_sv, "%s::%s", stash_name,
GvNAME(gv));
because it's expensive (Perl_sv_setpvf_nocontext accounts for 29% of
pp_entersub_profiler).
Use a two level hash: HvNAME(GvSTASH(gv)) then GvNAME(gv).
@@ -353,6 +346,9 @@
Add (very) basic nytprofhtml test (ie it runs and produces output) so we
check the VERSION has been updated.
-Ponder setting PERLDBf_SAVESRC etc
-
called by list: "by $subname line $line of $file" make the file not
include the inc portion
+
+Add caller sub name (via $profile->subname_at_file_line($fid, $line)) to
sub
+caller info so report_src_line() doesn't have to do the expensive lookup.
+It's also a useful step on the road to the profiler storing the calling
sub's
+name when generating the profile.
Modified: trunk/NYTProf.xs
==============================================================================
--- trunk/NYTProf.xs (original)
+++ trunk/NYTProf.xs Sat Jan 3 04:03:28 2009
@@ -2068,6 +2068,8 @@
sub_call_start_t sub_call_start;
if (profile_subs && is_profiling) {
+ if (!profile_stmts)
+ reinit_if_forked(aTHX);
get_time_of_day(sub_call_start.sub_call_time);
sub_call_start.current_overhead_ticks = cumulative_overhead_ticks;
sub_call_start.current_subr_secs = cumulative_subr_secs;
@@ -2075,9 +2077,9 @@
/*
* for normal subs pp_entersub enters the sub
- * and returns the first op *within* the sub (typically a dbstate).
+ * and returns the first op *within* the sub (typically a
nextstate/dbstate).
* for XS subs pp_entersub executes the entire sub
- * and returning the op *after* the sub (PL_op->op_next)
+ * and returns the op *after* the sub (PL_op->op_next)
*/
op = run_original_op(OP_ENTERSUB); /* may croak */
Modified: trunk/bin/nytprofhtml
==============================================================================
--- trunk/bin/nytprofhtml (original)
+++ trunk/bin/nytprofhtml Sat Jan 3 04:03:28 2009
@@ -344,10 +344,8 @@
</table>
};
- # make table sortable if it contains all the subs
push @on_ready_js, qq{
\$("#$table_id").tablesorter({
- sortList: [[0,1],[3,0]],
headers: {
0: { sorter: 'fmt_time' },
}
--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---