On Tue, Mar 03, 2009 at 10:30:44PM -0800, Joshua ben Jore wrote: > > On Tue, Mar 3, 2009 at 1:34 PM, <[email protected]> wrote: > > > > Author: tim.bunce > > Date: Tue Mar 3 13:34:18 2009 > > New Revision: 687 > > > > Modified: > > trunk/HACKING > > > > Log: > > Added note to HACKING about reporting when method cache is invalidated. > > That's interesting. I'm currently noodling around inside PPI where I > theorize much of the slowness is because all the objects are > overloaded. Detection of AMG might be interesting.
Code called due to overloading is already detected. (See the screencast at http://blip.tv/file/1812013/ - starting around 27:25s) What I'm refering to in that note is the currently hidden cost of re-caching method lookups. Both ordinary methods where the cache is invalidated and repopulated on demand (if GvCVGEN(gv) != PL_sub_generation), and the overload method table which is recalculated for a package by Gv_AMupdate() if PL_sub_generation or PL_amagic_generation has changed. [That paragraph probably sounds like I know what I'm talking about. My internals foo is pretty rusty though, so don't be fooled :-] All that's needed (I think) on the profiler side is for PL_sub_generation and PL_amagic_generation to be monitored for changes by NYTProf's DB_stmt() function. If either has changed since the last call then output a new tag. Volunteers? Reporting would be a little more tricky since we'd only really care about cache invalidations after the INIT phase. So we'd probably need the BEGIN/INIT/RUN/END phase markers I've been meaning to add for a while. Tim. --~--~---------~--~----~------------~-------~--~----~ 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] -~----------~----~----~----~------~----~------~--~---
