com php-src: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps::
Makefile.global configure.in

From: Date: Tue, 26 May 2015 14:33:25 +0000
Subject: com php-src: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps::
Makefile.global configure.in
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86938@lists.php.net to get a copy of this message
Commit: 7dac4d449f72d7eb029aa1a8ee87aaf38e17e1c5 Author: Dmitry Stogov <dmitry@zend.com> Tue, 26 May 2015 17:33:25 +0300 Parents: ca31711625095c2d6e308d7f0fc9d371ad0934d4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7dac4d449f72d7eb029aa1a8ee87aaf38e17e1c5 Log: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps: make clean make -j4 prof-gen ; now php should be trained with some scripts ; for example sapi/cgi/php -T 1000 /var/www/http/wordpress/index.php > /dev/null make prof-clean make -j4 prof-use The "properly" trained build may give up to 10% real performance boost! "Improprly" trained PHP might be even slower. Changed paths: M Makefile.global M configure.in Diff: diff --git a/Makefile.global b/Makefile.global index f833efa..c571f34 100644 --- a/Makefile.global +++ b/Makefile.global @@ -130,5 +130,18 @@ distclean: clean fi $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f -.PHONY: all clean install distclean test +prof-gen: + CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all + +prof-clean: + find . -name \*.lo -o -name \*.o | xargs rm -f + find . -name \*.la -o -name \*.a | xargs rm -f + find . -name \*.so | xargs rm -f + rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/* + +prof-use: + CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all + + +.PHONY: all clean install distclean test prof-gen prof-clean prof-use .NOEXPORT: diff --git a/configure.in b/configure.in index ffc714f..9aefa2b 100644 --- a/configure.in +++ b/configure.in @@ -1435,10 +1435,10 @@ CC=$old_CC PHP_CONFIGURE_PART(Generating files) CXXFLAGS_CLEAN=$CXXFLAGS -CFLAGS_CLEAN=$CFLAGS +CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)" CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag" INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" -CXXFLAGS="$CXXFLAGS $standard_libtool_flag" +CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)" if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then pharcmd=pharcmd

« previous php.cvs (#86938) next »