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

Windows: build with "build_pgo.bat -2" fails to optimize python.dll #61867

Closed
akruis mannequin opened this issue Apr 8, 2013 · 4 comments
Closed

Windows: build with "build_pgo.bat -2" fails to optimize python.dll #61867

akruis mannequin opened this issue Apr 8, 2013 · 4 comments
Labels
build The build process and cross-build OS-windows

Comments

@akruis
Copy link
Mannequin

akruis mannequin commented Apr 8, 2013

BPO 17667
Nosy @loewis, @tjguk, @zware, @akruis
Files
  • build_pgo-2.patch: Patch to fix this issue
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-09-10.13:01:34.261>
    created_at = <Date 2013-04-08.18:10:34.607>
    labels = ['build', 'OS-windows']
    title = 'Windows: build with "build_pgo.bat -2" fails to optimize python.dll'
    updated_at = <Date 2019-09-10.13:01:34.261>
    user = 'https://github.com/akruis'

    bugs.python.org fields:

    activity = <Date 2019-09-10.13:01:34.261>
    actor = 'steve.dower'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-10.13:01:34.261>
    closer = 'steve.dower'
    components = ['Build', 'Windows']
    creation = <Date 2013-04-08.18:10:34.607>
    creator = 'anselm.kruis'
    dependencies = []
    files = ['29739']
    hgrepos = []
    issue_num = 17667
    keywords = ['patch']
    message_count = 4.0
    messages = ['186322', '223474', '229061', '229221']
    nosy_count = 4.0
    nosy_names = ['loewis', 'tim.golden', 'zach.ware', 'anselm.kruis']
    pr_nums = []
    priority = 'low'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue17667'
    versions = ['Python 2.7']

    @akruis
    Copy link
    Mannequin Author

    akruis mannequin commented Apr 8, 2013

    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.

    @akruis akruis mannequin added build The build process and cross-build OS-windows labels Apr 8, 2013
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 19, 2014

    See also bpo-21907.

    @zware
    Copy link
    Member

    zware commented Oct 11, 2014

    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.

    @akruis
    Copy link
    Mannequin Author

    akruis mannequin commented Oct 13, 2014

    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.

    @zooba zooba closed this as completed Sep 10, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build OS-windows
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants