diff options
author | Steffen Mueller <smueller@cpan.org> | 2013-07-02 19:06:01 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2013-07-02 19:19:07 +0200 |
commit | 75d476e24a01b66c507ec2d7c2c99d3f810f625e (patch) | |
tree | 4a9142241a8fb190196aba5c2a092d280104457a /dump.c | |
parent | 520d1ba1ab135f43cd211b44c5fc6a1beda7b4f4 (diff) | |
download | perl-75d476e24a01b66c507ec2d7c2c99d3f810f625e.tar.gz |
-DPERL_TRACE_OPS to produce reports on executed OP counts
This produces a report on the number of OPs of a given type that were
executed at the end of a program run. This can be useful in multiple
ways. One, it can help determine hotspots for optimization (yes, I know
execution count is not equal execution time). It can also help with
determining whether a given change to perl has had the desired effect on
deterministic programs.
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2213,6 +2213,9 @@ Perl_runops_debug(pTHX) DEBUG_l(Perl_deb(aTHX_ "Entering new RUNOPS level\n")); do { +#ifdef PERL_TRACE_OPS + ++PL_op_exec_cnt[PL_op->op_type]; +#endif if (PL_debug) { if (PL_watchaddr && (*PL_watchaddr != PL_watchok)) PerlIO_printf(Perl_debug_log, |