Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-29243: Fix Makefile with respect to --enable-optimizations #1478

Merged
merged 2 commits into from
May 5, 2017

Conversation

torsava
Copy link
Contributor

@torsava torsava commented May 5, 2017

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during make but rebuilt again during make test and
make install. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see "all" in testall, testuniversal, quicktest, smelly, patchcheck. Please update these ones as well.

But thank you for working on this very annoying bug!

@torsava torsava force-pushed the pgo-makefile-fix branch from 694c16c to 874d990 Compare May 5, 2017 11:04
@torsava
Copy link
Contributor Author

torsava commented May 5, 2017

I still see "all" in testall, testuniversal, quicktest, smelly, patchcheck. Please update these ones as well.

Ah, you're right, thanks for the help! I've amended the commit accordingly.

@vstinner
Copy link
Member

vstinner commented May 5, 2017

I ran the following test and I only see Python compiled twice, as expected:

  • build with generate profile
  • run the profile task
  • build with the collected data

Command:

./configure --with-pydebug --prefix=/home/haypo/pgo --enable-optimizations
vim Makefile   # write "PROFILE_TASK=-c pass", just to get a quick test
make
make install
make quicktest

@vstinner vstinner dismissed their stale review May 5, 2017 12:04

"all" target is no more used directly in Makefile

@vstinner
Copy link
Member

vstinner commented May 5, 2017

Can you please document the change in the Build section in Misc/NEWS? With a NEWS entry, the change will be ready to be merged.

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.
@torsava torsava force-pushed the pgo-makefile-fix branch from 874d990 to 1d67431 Compare May 5, 2017 12:16
@torsava
Copy link
Contributor Author

torsava commented May 5, 2017

Amended the commit with a NEWS entry!

@louisom
Copy link
Contributor

louisom commented May 5, 2017

@torsava you don't need to rebase or squash the commit, at the end of the merge it will do it so :)

@vstinner
Copy link
Member

vstinner commented May 5, 2017

Oh, I'm sorry, I missed the "First-time contributor" notice on GitHub. Would you mind to add your name in Misc/ACKS as well?

@torsava
Copy link
Contributor Author

torsava commented May 5, 2017

@torsava you don't need to rebase or squash the commit, at the end of the merge it will do it so :)

Ah, thank you! I wasn't sure what the merging policy was here, and I dislike simple changes drawn out over multiple commits. (I now realise it's addressed in the contributor guide, sorry for missing that.)

Oh, I'm sorry, I missed the "First-time contributor" notice on GitHub. Would you mind to add your name in Misc/ACKS as well?

Done, thanks!

@torsava torsava force-pushed the pgo-makefile-fix branch from 2b24192 to 474e079 Compare May 5, 2017 13:03
@louisom
Copy link
Contributor

louisom commented May 5, 2017

@torsava yes, I did this before, I also like to squash to make it clean. But that is not good for others to reviewing on GitHub when doing squashing.

And there is a discussion (I dont' remember on python-dev or python-committers) about this, the final answer is: don't squash and leave to the end, you can see here for more information: devguide-pullrequest

@vstinner vstinner merged commit a1054c3 into python:master May 5, 2017
@vstinner
Copy link
Member

vstinner commented May 5, 2017

Thank you for your contrib Tomáš Orsava! This bug annoyed me, I opened a duplicate issue: http://bugs.python.org/issue29641

@torsava: Do you want to do the backports? https://docs.python.org/devguide/committing.html#backporting-changes-to-an-older-version

@torsava
Copy link
Contributor Author

torsava commented May 5, 2017

Thank you for your contrib Tomáš Orsava! This bug annoyed me, I opened a duplicate issue: http://bugs.python.org/issue29641

Glad to have helped!

@torsava: Do you want to do the backports?

I'm having some trouble with cherry_picker and I need to be going now. However, if it can wait a few days, I would like to do the backports!

@vstinner
Copy link
Member

vstinner commented May 5, 2017

I'm having some trouble with cherry_picker and I need to be going now. However, if it can wait a few days, I would like to do the backports!

Take your time, there is no urgency ;-) You can ping me directly, we are colleagues ;-)

@gpshead
Copy link
Member

gpshead commented May 6, 2017

thank you! :)

duggelz pushed a commit to GoogleCloudPlatform/python-runtime that referenced this pull request May 9, 2017
Source is python/cpython#1478,
backported to 3.5 and 3.6.
duggelz pushed a commit to GoogleCloudPlatform/python-runtime that referenced this pull request May 9, 2017
Source is python/cpython#1478,
backported to 3.5 and 3.6.
torsava added a commit to torsava/cpython that referenced this pull request May 9, 2017
…n#1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash

(cherry picked from commit a1054c3)
torsava added a commit to torsava/cpython that referenced this pull request May 9, 2017
…ythonGH-1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3)
vstinner pushed a commit that referenced this pull request May 9, 2017
…H-1478) (#1518)

* bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash

(cherry picked from commit a1054c3)

* [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3)
torsava added a commit to torsava/cpython that referenced this pull request May 9, 2017
…ythonGH-1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3)
vstinner pushed a commit that referenced this pull request May 9, 2017
…H-1478) (#1520)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3)
torsava added a commit to torsava/cpython that referenced this pull request May 9, 2017
…ythonGH-1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3)
vstinner pushed a commit that referenced this pull request May 9, 2017
…H-1478) (#1522)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3)
duggelz pushed a commit to GoogleCloudPlatform/python-runtime that referenced this pull request May 9, 2017
Source is python/cpython#1478,
backported to 3.5 and 3.6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants