From 291f3475c5360d376682a3c48f98cbe9e87d5823 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 20 Jan 2017 08:23:21 +0100 Subject: php 5.6.30 make DTrace optional (backported from PHP 7) --- php-5.6.30-dtrace.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ php56.spec | 8 +++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 php-5.6.30-dtrace.patch 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 +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 + diff --git a/php56.spec b/php56.spec index 2af532d..d220d92 100644 --- a/php56.spec +++ b/php56.spec @@ -144,7 +144,7 @@ %endif #global rcver RC1 -%global rpmrel 1 +%global rpmrel 2 Summary: PHP scripting language for creating dynamic web sites Name: php @@ -193,6 +193,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 @@ -957,6 +958,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1 %endif %patch40 -p1 -b .dlopen +%patch41 -p1 -b .dtrace %if 0%{?fedora} >= 24 || 0%{?rhel} >= 5 %patch42 -p1 -b .systzdata %endif @@ -1999,6 +2001,10 @@ fi %changelog +* Fri Jan 20 2017 Remi Collet 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 5.6.30-1 - Update to 5.6.30 - http://www.php.net/releases/5_6_30.php -- cgit