From: Doug MacEachern Date: Tue, 12 Jun 2001 23:05:44 +0000 (-0700) Subject: [patch] perl.gprof control X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2c4f7f0e97d22d4d7509fee1fc57509fac9291b6;p=p5sagit%2Fp5-mst-13.2.git [patch] perl.gprof control Message-ID: p4raw-id: //depot/perl@10559 --- diff --git a/miniperlmain.c b/miniperlmain.c index 2994440..ed28f47 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 1673da9..fd22a06 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"