Skip to content

Is PROFILE_TASK actually used in the Dockerfile? #979

Closed

Description

@RobertDeRose

I see that in the history of the linux template, that PROFILE_TASK was specifically set to a value and used across both invocation of make. However, I downloaded the 3.12.7 and 3.13.0 Dockerfiles to understand what it going on, and I enabled Docker's full logging and noticed that the profiling step does not get invoked.

It appears that this variable is now "" and then the Makefile just skips the step, thus essentially disabling the --enabled-optimization flag.

If someone could just confirm my findings and ensure I am not missing something, that would be awesome.

Thanks!

Activity

  1. yosifkit commented on Oct 15, 2024

    @yosifkit
    Member

    Doh, yeah that is causing it to skip the optimizations 😢. Now that none of the python versions need PROFILE_TASK, we can just drop it out of the template and apply the results (rather than having to conditionalize it in the template). Looks like it was missed when PROFILE_TASK was moved around in #794.

  2. edmorley commented on Oct 15, 2024

    @edmorley
    Contributor

    Wouldn't the test -z here ignore PROFILE_TASK if set to the empty string, and so continue to use the default task in that case?
    https://github.com/python/cpython/blob/37e533a39716bf7da026eda2b35073ef2eb3d1fb/configure.ac#L1905

  3. edmorley commented on Oct 15, 2024

    @edmorley
    Contributor

    (but either way, passing in PROFILE_TASK is dead code now and can be removed :-) )

  4. yosifkit commented on Oct 15, 2024

    @yosifkit
    Member

    Yeah, but we're setting for the make invocation, which doesn't look for empty

    make -j "$nproc" \
    "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \
    "LDFLAGS=${LDFLAGS:-}" \
    "PROFILE_TASK=${PROFILE_TASK:-}" \

    https://github.com/python/cpython/blob/37e533a39716bf7da026eda2b35073ef2eb3d1fb/Makefile.pre.in#L330

  5. RobertDeRose commented on Oct 15, 2024

    @RobertDeRose
    ContributorAuthor

    Oh, glad I am not crazy, I can open a PR for this.

  6. yosifkit commented on Oct 15, 2024

    @yosifkit
    Member

    That'd be great. Thank you!

  7. added 3 commits that reference this issue on Oct 15, 2024
    a4fc3b3
    9285fd8
    1c7e290
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions