Edit report at https://bugs.php.net/bug.php?id=73111&edit=1
ID: 73111
Updated by: dmitry@php.net
Reported by: spam2 at rhsoft dot net
Summary: make prof-use don't work -> still profiling code
-Status: Assigned
+Status: Feedback
-Type: Bug
+Type: Feature/Change Request
Package: Compile Failure
Operating System: Linux
PHP Version: 7.0.12 RC1
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
The general PGO build instruction:
make prof-gen
<training>
make prof-clean
make prof-use
but it's also possible to build with PGO only particular files (e.g. zend_execute.c). In last
case implicit prof-clean makes more problems than profit.
I wouldn't change anything.
Previous Comments:
------------------------------------------------------------------------
[2016-09-30 15:58:10] nikic@php.net
@dmitry: As you implemented these make targets, was there a particular reason why prof-clean is a
separate step (rather than being automatically triggered by prof-use)?
------------------------------------------------------------------------
[2016-09-30 01:39:17] yohgaki@php.net
Reasonable. I'm +1 for making
make prof-clean
implicit.
------------------------------------------------------------------------
[2016-09-30 01:24:51] spam2 at rhsoft dot net
probably, but on the other hand "make prof-use" without "make prof-gen" before
don't make any sense and the same for missing "make prop-clean" after running sample
scripts, hence "make prop-clean" should be implicit
additional you can't fix all the other references not mentioning "make prof-clean"
while i wonder how they all pretend to got a sucessful build r did they just imagine optimization
and not realize that their final binary still contains the profiling code and spits in logs all day
long?
https://software.intel.com/en-us/blogs/2015/10/09/pgo-let-it-go-phphttp://www.phpclasses.org/blog/post/321-PHP-7-Performance-Improvements-May-Increase-if-You-Optimize-it-to-Your-Application-using-to-PGO.html
------------------------------------------------------------------------
[2016-09-30 01:10:04] yohgaki@php.net
Make this a doc issue?
This page might be the page.
http://jp2.php.net/manual/en/faq.build.php
------------------------------------------------------------------------
[2016-09-29 23:15:34] spam2 at rhsoft dot net
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^^^
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=73111
--
Edit this bug report at https://bugs.php.net/bug.php?id=73111&edit=1