|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-09-19 08:21 UTC] spam2 at rhsoft dot net
Description: ------------ make prof-gen make test make prof-use the "make prof-use" just takes a second while i would expect a full compile using the gcda-files filled with informations wude running "make test" and that part works becuase while "make test" is running the timestamps of that files are changing after that there is still the profiling code in the binaries because running it on another machine at httpd startup you see these messages in the apache-errorlog profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/zlib/.libs/zlib.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/pcre/.libs/php_pcre.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/libxml/.libs/libxml.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/interval.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/parse_iso_intervals.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/unixtime2tm.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/tm2unixtime.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/timelib.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/parse_tz.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/parse_date.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/dow.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/lib/.libs/astro.gcda:Skip profiling:/home/builduser:Cannot create directory profiling:/home/builduser/rpmbuild/BUILD/php-7.0.11/ext/date/.libs/php_date.gcda:Ski Test script: --------------- make prof-gen make test make prof-use yes, i know that "make test" is probably not the best thing for PGO but a good start to get the build-process implemented and then replace it with running custom php-code and "make test" at the end with the final build Expected result: ---------------- a final PGO build without the profiling code Actual result: -------------- binaries which stil contain profiling code after "make prof-use" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 02:00:01 2025 UTC |
"make --always-make" seems to help partially echo "PROFILE-GUIDED-OPTIMIZATION: Stage 1" make %{?_smp_mflags} prof-gen /rpmbuild/PHP-PGO/profile.sh $PWD echo "PROFILE-GUIDED-OPTIMIZATION: Stage 2" make --always-make %{?_smp_mflags} prof-use but: Zend/zend_language_scanner.l:2406:1: error: the control flow of function 'lex_scan' does not match its profile data (counter 'indirect_call') [-Werror=coverage-mismatch] Zend/zend_language_scanner.l:2406:1: error: the control flow of function 'lex_scan' does not match its profile data (counter 'time_profiler') [-Werror=coverage-mismatch] cc1: some warnings being treated as errors Makefile:1721: recipe for target 'Zend/zend_ini_scanner.lo' failed make[1]: *** [Zend/zend_ini_scanner.lo] Error 1 cc1: some warnings being treated as errors Makefile:1717: recipe for target 'Zend/zend_language_scanner.lo' failed make[1]: *** [Zend/zend_language_scanner.lo] Error 1 make[1]: Leaving directory '/home/builduser/rpmbuild/BUILD/php-7.0.11' Makefile:302: recipe for target 'prof-use' failed make: *** [prof-use] Error 2 Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.1UuVW4 (%build)Just checked the makefile, it seems pretty clear that the intended command sequence is make prof-gen # train make prof-clean make prof-use Your invocation is missing the "make prof-clean", which is what removes the compiler artifacts so that "make prof-use" will actually recompile.back at home - that sequence works: ________________________________________ make %{?_smp_mflags} prof-gen /usr/bin/bash /rpmbuild/PHP-PGO/profile.sh $PWD make prof-clean make %{?_smp_mflags} prof-use ________________________________________ the size difference of the resulting binaries with no other changes is dramatically -rwxr-xr-x 1 root root 5,8M 2016-09-29 17:20 /usr/bin/php -rwxr-xr-x 1 root root 4,9M 2016-09-29 18:19 /usr/bin/php ________________________________________ after thinking again about "--always-make forces a regeneration of the lexer and you have a different re2c version installed which was used to generate the lexer in the repo, so you end up with minor differences in control flow" i tried ot add "--always-make" to the "make prof-gen" call that seems to make some differnce BUT the reduced binary size is completly gone (retried 2 times, with --always-make only in the first and also in both calls) it's not really related to this bugreport, but given that bison/re2c are seem to do something but the binaries end as large as with the missing "make prof-clean" maybe it's better to leave --always-make completly out of the game +/home/builduser/rpmbuild/BUILD/php-7.0.12/Zend/zend_ini_parser.y:264.1-12: warning: deprecated directive, use '%pure-parser' [-Wdeprecated] + %pure_parser + ^^^^^^^^^+bison -y --defines -l /home/builduser/rpmbuild/BUILD/php-7.0.12/ext/json/json_parser.y -o /home/builduser/rpmbuild/BUILD/php-7.0.12/ext/json/json_parser.tab.c^^^