this is a carry over from 1.3, other mpms would need to AP_MONCONTROL(1) in the appropriates places..
Index: include/ap_mpm.h =================================================================== RCS file: /home/cvs/httpd-2.0/include/ap_mpm.h,v retrieving revision 1.31 diff -u -r1.31 ap_mpm.h --- include/ap_mpm.h 2001/11/13 22:42:38 1.31 +++ include/ap_mpm.h 2001/11/24 00:22:33 @@ -183,4 +183,18 @@ */ AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result); +/* Defining GPROF when compiling uses the moncontrol() function to + * disable gprof profiling in the parent, and enable it only for + * request processing in children (or in one_process mode). It's + * absolutely required to get useful gprof results under linux + * because the profile itimers and such are disabled across a + * fork(). It's probably useful elsewhere as well. + */ +#ifdef GPROF +extern void moncontrol(int); +#define AP_MONCONTROL(x) moncontrol(x) +#else +#define AP_MONCONTROL(x) +#endif + #endif Index: server/main.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/main.c,v retrieving revision 1.102 diff -u -r1.102 main.c --- server/main.c 2001/11/23 16:35:22 1.102 +++ server/main.c 2001/11/24 00:22:34 @@ -298,6 +298,8 @@ module **mod; const char *optarg; + AP_MONCONTROL(0); /* turn of profiling of startup */ + apr_initialize(); process = create_process(argc, argv); Index: server/mpm/prefork/prefork.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v retrieving revision 1.222 diff -u -r1.222 prefork.c --- server/mpm/prefork/prefork.c 2001/11/20 18:18:45 1.222 +++ server/mpm/prefork/prefork.c 2001/11/24 00:22:35 @@ -759,6 +759,7 @@ } #endif RAISE_SIGSTOP(MAKE_CHILD); + AP_MONCONTROL(1); /* Disable the parent's signal handlers and set up proper handling in * the child. */ @@ -969,6 +970,10 @@ #endif set_signals(); + + if (one_process) { + AP_MONCONTROL(1); + } if (ap_daemons_max_free < ap_daemons_min_free + 1) /* Don't thrash... */ ap_daemons_max_free = ap_daemons_min_free + 1;