Devel::Profiler::Apache - Hook Devel::Profiler into mod_perl


 # in httpd.conf
 PerlModule Devel::Profiler::Apache;

 # or in
 use Devel::Profiler::Apache;


The Devel::Profiler::Apache module will run a Devel::Profiler profiler inside each child server and write the tmon.out file in the directory $ServerRoot/logs/profiler/$$ when the child is shutdown. The next time the parent server pulls in Devel::Profiler::Apache (via soft or hard restart), the $ServerRoot/logs/dprof is cleaned out before new profiles are written for the new children.

Devel::Profiler::Apache currently uses the package_filter option to avoid profiling any modules that begin with Apache::. This necessary to avoid profiling sensitive Apache XS code that do strange things with their symbol tables (storing arrays in the CODE slots, for one!). At some point this will be refined to only exclude the problem modules within Apache::.


Most users of Devel::Profiler can simply copy the code from the SYNPOSIS and use that as-is. However, if you need to modify the way Devel::Profiler works then you can pass Devel::Profiler::Apache the same options that are used with Devel::Profiler:

  use Devel::Profiler::Apache buffer_size => 1024;


This module is based heavily on Apache::DProf by Doug MacEachern which provides equivalent functionality for Apache::DProf.


Sam Tregar


Devel::Profiler, Apache::DProf