Author: tim.bunce
Date: Tue Nov 18 14:45:37 2008
New Revision: 607
Modified:
trunk/lib/Devel/NYTProf.pm
Log:
Document effect of not being able to profile sub calls made due to
overloading.
Note change needed to Perl_amagic_call in perl internals.
(The same issue (direct use of Perl_pp_entersub) affects call_body().
If that was changed then the profiler could view string evals as sub calls.)
Modified: trunk/lib/Devel/NYTProf.pm
==============================================================================
--- trunk/lib/Devel/NYTProf.pm (original)
+++ trunk/lib/Devel/NYTProf.pm Tue Nov 18 14:45:37 2008
@@ -558,8 +558,23 @@
=head2 Calls made via operator overloading
-Calls made via operator overloading are not noticed by any subroutine
profiler.
+Calls made via operator overloading are not noticed by the I<subroutine>
profiler.
Though the statements executed by the code in the overload subs are
profiled.
+
+The effect is that time in the subroutines that handle overloading is
+accumulated by any subroutines that trigger overloading (so it is
measured, but
+the cost is disbursed across possibly many calling locations).
+
+(Technically the change needed to perl internals is for Perl_amagic_call
to call
+Perl_pp_entersub via the PL_ppaddr[OP_ENTERSUB] pointer. Patches welcome.)
+
+Alternatively you could use a profiler based on the traditional DB::sub()
call
+approach, but then you wouldn't be able to profile xsubs call or any of the
+other goodness that NYTProf offers.
+
+(Alternatively, technically NYTProf could optionally install a DB::sub()
just
+to identify these edge cases. They can be identified by the current op in
DB::sub()
+being different to the op last seen by the sub profiler. Patches welcome.)
=head2 goto
--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---