com php-src: Disabled PHP call tracing by default (it makes significant overhead). This may be enabled again using envirionment variable
USE_ZEND_DTRACE=1.: NEWS Zend/zend.c
| From: | Dmitry Stogov | Date: | Fri, 18 Nov 2016 10:19:30 +0000 |
| Subject: | com php-src: Disabled PHP call tracing by default (it makes significant overhead). This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.: NEWS Zend/zend.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95863@lists.php.net to get a copy of this message | ||
Commit: 0c78fe4bb55a9d39afc79cbcbadb9a273f2ec2ef
Author: Dmitry Stogov <dmitry@zend.com> Fri, 18 Nov 2016 13:19:30 +0300
Parents: 5008acd1f6e3531856c219cb73dc093eb3ea2687
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0c78fe4bb55a9d39afc79cbcbadb9a273f2ec2ef
Log:
Disabled PHP call tracing by default (it makes significant overhead).
This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
Changed paths:
M NEWS
M Zend/zend.c
Diff:
diff --git a/NEWS b/NEWS
index 02c8d33..5c6ed06 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,11 @@ PHP NEWS
- Date:
. Fixed bug #69587 (DateInterval properties and isset). (jhdxr)
+- DTrace:
+ . Disabled PHP call tracing by default (it makes significant overhead).
+ This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
+ (Dmitry)
+
- ODBC:
. Fixed bug #73448 (odbc_errormsg returns trash, always 513 bytes).
(Anatol)
diff --git a/Zend/zend.c b/Zend/zend.c
index d036152..87cdead 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -678,9 +678,19 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
/
#if HAVE_DTRACE
/* build with dtrace support */
- zend_compile_file = dtrace_compile_file;
- zend_execute_ex = dtrace_execute_ex;
- zend_execute_internal = dtrace_execute_internal;
+ {
+ char *tmp = getenv("USE_ZEND_DTRACE");
+
+ if (tmp && zend_atoi(tmp, 0)) {
+ zend_compile_file = dtrace_compile_file;
+ zend_execute_ex = dtrace_execute_ex;
+ zend_execute_internal = dtrace_execute_internal;
+ } else {
+ zend_compile_file = compile_file;
+ zend_execute_ex = execute_ex;
+ zend_execute_internal = NULL;
+ }
+ }
#else
zend_compile_file = compile_file;
zend_execute_ex = execute_ex;