Jeff wrote:
> 
> Not sure if its relevant, but from general Perl usage, Devel::Profiler
> often fails to properly recognise function names if its USE statement
> ends up being executed before your classes have been USEd.
> 
> If you use factories to instantiate objects from calculated class names,
> those methods won't be recognised unless you explicitly USE them (i.e.
> rather than run-time REQUIRE them).

yes, because Devel::Profiler scans for then during it's import routine.
 the behavior is slightly different under mod_perl (the scan is delayed)
so it probably doesn't have the same effect - in mod_perl we don't want
to generate things the way you're describing since it prevents us from
maximizing shared memory (you want to use() everything before the
children are forked).

> 
> To test if this is your issue, you might find a class with methods not
> being recognised, and add a USE statement for this class just before you
> call in the profiler, and then check the results.

he's not using Devel::Profiler (yet) but maybe Devel::DProf has the same
limitation.  it never hurts to try :)

> 
> Also, Devel::Profiler can't handle many of the DBI implementations (you
> have to bad_pkgs=>[] them.

I don't have any trouble with core DBI or DBD::mysql or DBD::Oracle.
but there are lots of DBI-esque packages out there so I'll believe you.
 in general Devel::Profiler doesn't like overloaded things.

you might also try the latest from svn to see if that works better for you:

  http://sourceforge.net/projects/devel-profiler/

HTH

--Geoff

> 
> Regards
> Jeff
> 
> 
> -------- Original Message --------
> Subject: Apache::DProf missing some subroutines
> From: John ORourke <[EMAIL PROTECTED]>
> To: modperl <modperl@perl.apache.org>
> Date: 11 May 2007 12:36:02
> 
>> Hi folks,
>>
>> Any idea why Apache::DProf would be failing to list some subroutines
>> that are definitely being called, in the tmon.out file?
>>
>> I grepped all sub references from tmon.out and it's listing my method
>> handlers, it's listing some of my constructors, and its listing some
>> object methods, but there are loads missing.  I know they should be
>> there because some of the listed subs are only called from non-listed
>> ones!
>>
>> The only things I'm doing which might affect it are:
>>  - a fair bit of subclassing, but that doesn't explain many of the
>> missing ones
>>  - using Error.pm - could this be interfering?
>>
>> cheers
>> John
>>

Reply via email to