You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Hirt <bh...@mobygames.com> on 2003/08/29 23:11:13 UTC

Apache::DProf problems

I've installed Apache::DProf, but it seems hardly any of the calls are 
profiled.   dprofpp shouws MOF::Dispatcher::handler as taking up 100% 
of the time, but there is no information recorded in for calls within 
that function.  MOF::Dispatcher::handler is calling thousands of other 
functions and there is absolutely no record of any of those calls in 
tmon.out.

Any ideas an what's going on?  I'm running mp1.27 and compiled it with 
EVERYTHING=1

[root@loopy modperl]# dprofpp logs/dprof/2734/tmon.out
Total Elapsed Time = 7.359757 Seconds
   User+System Time = 0.349757 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
  100.   0.350  0.350      1   0.3499 0.3499  MOF::Dispatcher::handler
  0.00   0.000 -0.000      1   0.0000      -  
MOF::Dispatcher::ProxyCleanup::handler
  0.00   0.000 -0.000      8   0.0000      -  Apache::Table::TIEHASH
  0.00   0.000 -0.000      1   0.0000      -  Apache::Table::FETCH
  0.00   0.000 -0.000     16   0.0000      -  Apache::Table::DESTROY
  0.00   0.000 -0.000      5   0.0000      -  MOF::DBObject::DESTROY
  0.00   0.000 -0.000     14   0.0000      -  DBD::Pg::db::prepare
  0.00   0.000 -0.000     14   0.0000      -  DBI::st::TIEHASH
  0.00   0.000 -0.000     28   0.0000      -  DBI::st::DESTROY
  0.00   0.000 -0.000     14   0.0000      -  DBD::_mem::common::DESTROY
  0.00   0.000 -0.000      8   0.0000      -  IO::Handle::DESTROY
  0.00   0.000 -0.000      1   0.0000      -  DBD::Pg::db::quote
  0.00   0.000 -0.000      7   0.0000      -  Apache::PRINT
  0.00   0.000 -0.000      2   0.0000      -  Image::Magick::DESTROY
  0.00   0.000 -0.000      1   0.0000      -  MOF::Object::DESTROY



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Apache::DProf problems

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2003-08-29 at 17:11, Brian Hirt wrote:
> I've installed Apache::DProf, but it seems hardly any of the calls are 
> profiled.

You probably compiled that code before you initialized the debugger. 
Add a call to Apache::DB->init before you load your modules, as
described in the Apache::DB docs.

- Perrin


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Apache::DProf problems

Posted by Perrin Harkins <pe...@elem.com>.
On Sat, 2003-08-30 at 15:34, Brian Hirt wrote:
> i'll double check, but i'm fairly certain it's loaded first.

If you post your conf, we could probably help you more.

> what if a module is loaded after the fact, but like this:   eval { use 
> $module };

Doesn't matter.  You just have to initialize the debugger.  I do this by
calling Apache::DB->init because I don't want to actually profile
anything during startup but I do need the debugger turned on when I
compile code at startup for DProf to work.

- Perrin


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Apache::DProf problems

Posted by Brian Hirt <bh...@mobygames.com>.
i'll double check, but i'm fairly certain it's loaded first.

what if a module is loaded after the fact, but like this:   eval { use 
$module };

some modules are dynamically loaded at run time depending on certain 
situations.

On Friday, August 29, 2003, at 04:26 PM, Stas Bekman wrote:

> Brian Hirt wrote:
>> I've installed Apache::DProf, but it seems hardly any of the calls 
>> are profiled.   dprofpp shouws MOF::Dispatcher::handler as taking up 
>> 100% of the time, but there is no information recorded in for calls 
>> within that function.  MOF::Dispatcher::handler is calling thousands 
>> of other functions and there is absolutely no record of any of those 
>> calls in tmon.out.
>> Any ideas an what's going on?  I'm running mp1.27 and compiled it 
>> with EVERYTHING=1
>
> Remember that any PerlHandler that was pulled in before Apache::DProf 
> in the httpd.conf or startup.pl file will not have code-debugging 
> information inserted. Make sure that you load before any code that you 
> plan to profile.
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Apache::DProf problems

Posted by Stas Bekman <st...@stason.org>.
Brian Hirt wrote:
> I've installed Apache::DProf, but it seems hardly any of the calls are 
> profiled.   dprofpp shouws MOF::Dispatcher::handler as taking up 100% of 
> the time, but there is no information recorded in for calls within that 
> function.  MOF::Dispatcher::handler is calling thousands of other 
> functions and there is absolutely no record of any of those calls in 
> tmon.out.
> 
> Any ideas an what's going on?  I'm running mp1.27 and compiled it with 
> EVERYTHING=1

Remember that any PerlHandler that was pulled in before Apache::DProf in the 
httpd.conf or startup.pl file will not have code-debugging information 
inserted. Make sure that you load before any code that you plan to profile.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html