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

Is PROFILE_TASK actually used in the Dockerfile? #979

Closed
RobertDeRose opened this issue Oct 15, 2024 · 6 comments · Fixed by #980
Closed

Is PROFILE_TASK actually used in the Dockerfile? #979

RobertDeRose opened this issue Oct 15, 2024 · 6 comments · Fixed by #980

Comments

@RobertDeRose
Copy link
Contributor

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!

@yosifkit
Copy link
Member

yosifkit commented Oct 15, 2024

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.

@edmorley
Copy link
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

@edmorley
Copy link
Contributor

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

@yosifkit
Copy link
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

@RobertDeRose
Copy link
Contributor Author

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

@yosifkit
Copy link
Member

That'd be great. Thank you!

RobertDeRose added a commit to RobertDeRose/python that referenced this issue Oct 15, 2024
When this is set, the `--enable-optimizations` option becomes ineffective, as
the profile task step is bypassed.

closes docker-library#979
RobertDeRose added a commit to RobertDeRose/python that referenced this issue Oct 16, 2024
When this is set, the `--enable-optimizations` option becomes ineffective, as
the profile task step is bypassed.

For 3.13, have to edit the Makefile to revert the original behavior because xml
tests fail on older distros because of expat issues.

closes docker-library#979
RobertDeRose added a commit to RobertDeRose/python that referenced this issue Oct 16, 2024
When this is set, the `--enable-optimizations` option becomes ineffective, as
the profile task step is bypassed.

For 3.13, have to edit the Makefile to revert the original behavior because xml
tests fail on older distros because of expat issues.

closes docker-library#979
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 a pull request may close this issue.

3 participants