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

Hard-coded Perl_pp_entersub and Perl_pp_entereval should usePL_ppaddr

Thread Next
From:
Tim Bunce
Date:
November 20, 2008 05:17
Subject:
Hard-coded Perl_pp_entersub and Perl_pp_entereval should usePL_ppaddr
Message ID:
20081120131719.GA32120@timac.local
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.

Tim.


Thread Next


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