This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows: build with "build_pgo.bat -2" fails to optimize python.dll
Type: compile error Stage: resolved
Components: Build, Windows Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: anselm.kruis, loewis, tim.golden, zach.ware
Priority: low Keywords: patch

Created on 2013-04-08 18:10 by anselm.kruis, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
build_pgo-2.patch anselm.kruis, 2013-04-08 18:10 Patch to fix this issue review
Messages (4)
msg186322 - (view) Author: Anselm Kruis (anselm.kruis) * Date: 2013-04-08 18:10
Version: 2.7.4 (and any prior 2.7-version. not tested with 3.x)
Compiler: VS 2008 Professional

If I compile Python using the batch 

> PCbuild\build_pgo.bat -2

Visual Studio fails to correctly collect profile information for the project "python27.dll". As a result, no real optimisation takes place.

The command "build_pgo.bat -2" runs the full test suite (..\lib\test\regrtest.py) to collect profile data. Experiments show, that several test cases (i.e. test_os and test_subprocess) break the collection of profile data. Probably the failure is related to the creation of sub-processes. I consider it a Visual Studio bug.

To work around this issue I created a list of good test cases and patched build_pgo.bat to run only the tests from this list.
msg223474 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-19 20:25
See also #21907.
msg229061 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-10-11 06:50
I think I'd rather see a blacklist than a whitelist; it should be much shorter and can be passed to regrtest with the "-x" option within build_pgo.bat.

Since we officially discourage PGO with VS 2008 and 2010 (due to compiler bugs) anyway, marking this as low priority.
msg229221 - (view) Author: Anselm Kruis (anselm.kruis) * Date: 2014-10-13 06:52
It's indeed a very low priority issue.

You mention VS2008 and VS2010 PGO compiler bugs. I'm aware of the VS 2010 bugs, but I didn't observe any VS 2008 PGO bug with Python 2.7. Are you aware of any publicly available bug reports?

About the black/white list. I started with a black list, but then I switched to a white list for the following reason: the goal of running the test suite is to generate a reasonable profile. It is not a goal to test anything. Therefore both white list and black listing is possible.
I consider it more likely that a newly added test breaks the PGO build than that an existing test will be modified in a breaking way. Therefore I consider the while list superior for this particular application.

But as you already stated, it is low prio.
History
Date User Action Args
2022-04-11 14:57:44adminsetgithub: 61867
2019-09-10 13:01:34steve.dowersetstatus: open -> closed
resolution: out of date
stage: patch review -> resolved
2019-05-03 16:43:29zach.waresetfiles: - 27409.pdf
2019-05-03 06:51:27Martha Simonssetfiles: + 27409.pdf
2019-04-26 17:48:09BreamoreBoysetnosy: - BreamoreBoy
2014-10-13 06:52:41anselm.kruissetmessages: + msg229221
2014-10-11 06:50:44zach.waresetpriority: normal -> low
nosy: + zach.ware
messages: + msg229061

2014-07-19 20:43:27brian.curtinsetnosy: - brian.curtin
2014-07-19 20:25:01BreamoreBoysetnosy: + BreamoreBoy
messages: + msg223474
2013-04-12 19:20:28pitrousetnosy: + loewis
2013-04-12 19:12:48terry.reedysetnosy: + tim.golden, brian.curtin

stage: patch review
2013-04-08 18:10:34anselm.kruiscreate