diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-05-31 16:16:56 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-05-31 16:16:56 +0300 |
commit | fc1ae1d1d3b1752c581e258fd3fcc3a184631baa (patch) | |
tree | cac5b1aacfc071f76a02ed61c27ef96dcfc4ee95 /sapi/cgi | |
parent | b54e0dc3217a1e0771f2ba7dff9d26974a9f83ef (diff) | |
download | php-git-fc1ae1d1d3b1752c581e258fd3fcc3a184631baa.tar.gz |
Exclude warm-up requests from callgrind profile.
Diffstat (limited to 'sapi/cgi')
-rw-r--r-- | sapi/cgi/cgi_main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 2cf16449f9..8639027dbc 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -96,6 +96,10 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; # include "openssl/applink.c" #endif +#ifdef HAVE_VALGRIND +# include "valgrind/callgrind.h" +#endif + #ifndef PHP_WIN32 /* XXX this will need to change later when threaded fastcgi is implemented. shane */ struct sigaction act, old_term, old_quit, old_int; @@ -2246,6 +2250,11 @@ consult the installation file that came with this distribution, or visit \n\ if (comma) { warmup_repeats = atoi(php_optarg); repeats = atoi(comma + 1); +#ifdef HAVE_VALGRIND + if (warmup_repeats > 0) { + CALLGRIND_STOP_INSTRUMENTATION; + } +#endif } else { repeats = atoi(php_optarg); } @@ -2668,6 +2677,9 @@ fastcgi_request_done: #else time(&start); #endif +#ifdef HAVE_VALGRIND + CALLGRIND_START_INSTRUMENTATION; +#endif } continue; } else { |