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

Quick dev hack: -DPERL_TRACE_OPS

From:
Steffen Mueller
Date:
July 2, 2013 17:43
Subject:
Quick dev hack: -DPERL_TRACE_OPS
Message ID:
51D3112D.4080000@cpan.org
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



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About