Skip to content

Commit 0c78fe4

Browse files
committed
Disabled PHP call tracing by default (it makes significant overhead).
This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
1 parent 5008acd commit 0c78fe4

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ PHP NEWS
1212
- Date:
1313
. Fixed bug #69587 (DateInterval properties and isset). (jhdxr)
1414

15+
- DTrace:
16+
. Disabled PHP call tracing by default (it makes significant overhead).
17+
This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
18+
(Dmitry)
19+
1520
- ODBC:
1621
. Fixed bug #73448 (odbc_errormsg returns trash, always 513 bytes).
1722
(Anatol)

Zend/zend.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,19 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
678678

679679
#if HAVE_DTRACE
680680
/* build with dtrace support */
681-
zend_compile_file = dtrace_compile_file;
682-
zend_execute_ex = dtrace_execute_ex;
683-
zend_execute_internal = dtrace_execute_internal;
681+
{
682+
char *tmp = getenv("USE_ZEND_DTRACE");
683+
684+
if (tmp && zend_atoi(tmp, 0)) {
685+
zend_compile_file = dtrace_compile_file;
686+
zend_execute_ex = dtrace_execute_ex;
687+
zend_execute_internal = dtrace_execute_internal;
688+
} else {
689+
zend_compile_file = compile_file;
690+
zend_execute_ex = execute_ex;
691+
zend_execute_internal = NULL;
692+
}
693+
}
684694
#else
685695
zend_compile_file = compile_file;
686696
zend_execute_ex = execute_ex;

0 commit comments

Comments
 (0)