Disabled PHP call tracing by default (it makes significant overhead).

This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
This commit is contained in:
Dmitry Stogov 2016-11-18 13:19:30 +03:00
parent 5008acd1f6
commit 0c78fe4bb5
2 changed files with 18 additions and 3 deletions

5
NEWS
View File

@ -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)

View File

@ -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;