Skip to content

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

Closed

Description

@akruis
mannequin
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']

    Activity

    1. akruis commented on Apr 8, 2013

      akruismannequin
      MannequinAuthor

      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.

    2. BreamoreBoy commented on Jul 19, 2014

      BreamoreBoymannequin
      Mannequin

      See also bpo-21907.

    3. zware commented on Oct 11, 2014

      @zware
      Member

      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.

    4. akruis commented on Oct 13, 2014

      akruismannequin
      MannequinAuthor

      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.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      OS-windowsbuildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions