summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miniperlmain.c4
-rw-r--r--perl.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/miniperlmain.c b/miniperlmain.c
index 2994440f46..ed28f47f2a 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -42,6 +42,10 @@ main(int argc, char **argv, char **env)
#undef PERLVARIC
#endif
+ /* if user wants control of gprof profiling off by default */
+ /* noop unless Configure is given -Accflags=-DPERL_GPROF_CONTROL */
+ PERL_GPROF_MONCONTROL(0);
+
PERL_SYS_INIT3(&argc,&argv,&env);
if (!PL_do_undump) {
diff --git a/perl.h b/perl.h
index 1673da9f71..fd22a063c9 100644
--- a/perl.h
+++ b/perl.h
@@ -3745,6 +3745,14 @@ int flock(int fd, int op);
#define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
+/* to let user control profiling */
+#ifdef PERL_GPROF_CONTROL
+extern void moncontrol(int);
+#define PERL_GPROF_MONCONTROL(x) moncontrol(x)
+#else
+#define PERL_GPROF_MONCONTROL(x)
+#endif
+
/* and finally... */
#define PERL_PATCHLEVEL_H_IMPLICIT
#include "patchlevel.h"