diff options
-rw-r--r-- | php-5.6.30-dtrace.patch | 44 | ||||
-rw-r--r-- | php.spec | 8 |
2 files changed, 51 insertions, 1 deletions
diff --git a/php-5.6.30-dtrace.patch b/php-5.6.30-dtrace.patch new file mode 100644 index 0000000..7f9e5a4 --- /dev/null +++ b/php-5.6.30-dtrace.patch @@ -0,0 +1,44 @@ +Backported from PHP 7 for PHP 5 by Remi + +From 0c78fe4bb55a9d39afc79cbcbadb9a273f2ec2ef Mon Sep 17 00:00:00 2001 +From: Dmitry Stogov <dmitry@zend.com> +Date: Fri, 18 Nov 2016 13:19:30 +0300 +Subject: [PATCH] Disabled PHP call tracing by default (it makes significant + overhead). This may be enabled again using envirionment variable + USE_ZEND_DTRACE=1. + +--- + NEWS | 5 +++++ + Zend/zend.c | 16 +++++++++++++--- + 2 files changed, 18 insertions(+), 3 deletions(-) + +diff --git a/Zend/zend.c b/Zend/zend.c +index d036152..87cdead 100644 +--- a/Zend/zend.c ++++ b/Zend/zend.c +@@ -682,9 +682,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; +-- +2.1.4 + @@ -138,7 +138,7 @@ %endif #global rcver RC1 -%global rpmrel 1 +%global rpmrel 2 Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php @@ -181,6 +181,7 @@ Patch9: php-5.5.30-curl.patch # Functional changes Patch40: php-5.4.0-dlopen.patch +Patch41: php-5.6.30-dtrace.patch Patch42: php-5.6.13-systzdata-v12.patch # See http://bugs.php.net/53436 Patch43: php-5.4.0-phpize.patch @@ -882,6 +883,7 @@ support for using the enchant library to PHP. %endif %patch40 -p1 -b .dlopen +%patch41 -p1 -b .dtrace %if 0%{?fedora} >= 24 || 0%{?rhel} >= 5 %patch42 -p1 -b .systzdata %endif @@ -1818,6 +1820,10 @@ fi %changelog +* Fri Jan 20 2017 Remi Collet <remi@fedoraproject.org> 5.6.30-2 +- disable dtrace by default, this may be enabled again using + environment variable USE_ZEND_DTRACE=1, backported from PHP 7 + * Thu Jan 19 2017 Remi Collet <remi@fedoraproject.org> 5.6.30-1 - Update to 5.6.30 - http://www.php.net/releases/5_6_30.php |