develooper Front page | perl.perl5.porters | Postings from November 2008

Hard-coded Perl_pp_entersub and Perl_pp_entereval should usePL_ppaddr

Thread Next
Tim Bunce
November 20, 2008 05:17
Hard-coded Perl_pp_entersub and Perl_pp_entereval should usePL_ppaddr
Message ID:
Perl_amagic_call in gv.c and S_call_body in perl.c are the only two
places that have hard-coded calls to Perl_pp_entersub or Perl_pp_entereval.

Hard-coding Perl_pp_entersub, instead of using the current value of
PL_ppaddr[OP_ENTERSUB], means tools that redirect opcodes, like NYTProf,
can't intercept the calls.

The effect is that NYTProf can't see subroutine calls made due to
overloading (Perl_amagic_call) or made by any use of the Perl_call_*
family of functions (S_call_body).

Apart from common overload usage like BigInt, it turns out Class::MOP,
and thus Moose apps, use '&{}' overloading. And embedded apps, like
mod_perl, make heavy use of the Perl_call_* functions.

The simple fix is attached.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About