Author: tim.bunce
Date: Sun Oct 26 14:31:37 2008
New Revision: 554
Modified:
trunk/NYTProf.xs
trunk/t/test90-stress.p
Log:
Add stmts=0 option to disable the statement profiler
(not documented yet as it's likely to change)
Silence a spurious warn in a test.
Modified: trunk/NYTProf.xs
==============================================================================
--- trunk/NYTProf.xs (original)
+++ trunk/NYTProf.xs Sun Oct 26 14:31:37 2008
@@ -187,7 +187,9 @@
{ "compress", 0 },
#endif
#define profile_clock options[8].option_value
- { "clock", -1 }
+ { "clock", -1 },
+#define profile_stmts options[9].option_value
+ { "stmts", 1 } /* statement exclusive
times */
};
/* time tracking */
@@ -1580,7 +1582,7 @@
if (overflow) /* XXX later output
overflow to file */
warn("profile time overflow of %d seconds discarded", overflow);
- if (!out || !is_profiling) {
+ if (!out || !is_profiling || !profile_stmts) {
SETERRNO(saved_errno, 0);
return;
}
@@ -1677,7 +1679,7 @@
* PL_curcop has already been updated.
*/
- if (!is_profiling || !out)
+ if (!is_profiling || !out || !profile_stmts)
return;
/* measure and output end time of previous statement
Modified: trunk/t/test90-stress.p
==============================================================================
--- trunk/t/test90-stress.p (original)
+++ trunk/t/test90-stress.p Sun Oct 26 14:31:37 2008
@@ -23,5 +23,5 @@
Readonly::Hash my %has => (A => 1, B => 2);
1;
} or die;
- warn "ok - readonly\n";
+ #warn "ok - readonly\n";
}
--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---