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 /intrpvar.h | |
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 'intrpvar.h')
-rw-r--r-- | intrpvar.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h index 6a0fd10f33..f6827f2bd5 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -777,6 +777,15 @@ PERLVARI(I, sv_serial, U32, 0) /* SV serial number, used in sv.c */ PERLVARA(I, sv_consts, SV_CONSTS_COUNT, SV*) /* constant SVs with precomputed hash value */ +#ifdef PERL_TRACE_OPS +PERLVARA(I, op_exec_cnt, OP_max+2, UV) /* Counts of executed OPs of the given type. + If PERL_TRACE_OPS is enabled, we'll dump + a summary count of all ops executed in the + program at perl_destruct time. For + profiling/debugging only. Works only if + DEBUGGING is enabled, too. */ +#endif + /* If you are adding a U8 or U16, check to see if there are 'Space' comments * above on where there are gaps which currently will be structure padding. */ |