develooper Front page | perl.perl5.porters | Postings from July 2013

Quick dev hack: -DPERL_TRACE_OPS

Steffen Mueller
July 2, 2013 17:43
Quick dev hack: -DPERL_TRACE_OPS
Message ID:
Just an FYI. Do feel free to tell me I reinvented a square wheel. It was 
30 minutes of work.

If you compile a Perl with -Accflags="-DDEBUGGING -DPERL_TRACE_OPS", you 
get a summary of all executed op counts by type at the end of the 
program execution. This makes it quite easy to do quick sanity checks 
for some partial understanding of bits of the core.

Just as an example, I was quite sure about the meaning of OPpLVAL_INTRO 
on PADHV and PADAVs. But not entirely. Tracing PADHV OPs with and 
without that flag set helped me understand things more clearly.

See also: 75d476e24a01b66c507ec2d7c2c99d3f810f625e
and 3dbcc5e0ae2d584501e47a0ca58e6f7a2888e02e

HTH someone,
Steffen Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About