*/
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
}
#endif
RAISE_SIGSTOP(MAKE_CHILD);
+ AP_MONCONTROL(1);
/* Disable the parent's signal handlers and set up proper handling in
* the child.
*/
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;