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

python3Minimal: disable optimizations #89489

Merged
merged 2 commits into from Jun 5, 2020
Merged

python3Minimal: disable optimizations #89489

merged 2 commits into from Jun 5, 2020

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Jun 4, 2020

No point for the bootstrapping, and not possible because patches are
fetched.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh FRidh added this to WIP in Staging via automation Jun 4, 2020
@FRidh FRidh self-assigned this Jun 4, 2020
@FRidh
Copy link
Member Author

FRidh commented Jun 4, 2020

@GrahamcOfBorg eval

@FRidh
Copy link
Member Author

FRidh commented Jun 4, 2020

need to use fetchurl instead of fetchpatch

@FRidh
Copy link
Member Author

FRidh commented Jun 4, 2020

@GrahamcOfBorg eval

ofborg does not like fetching patches when the derivation is used during bootstrapping.

This reverts commit 480c8d1.
@FRidh FRidh force-pushed the opt branch 2 times, most recently from f7c2c2c to 7532a05 Compare June 4, 2020 18:42
@FRidh
Copy link
Member Author

FRidh commented Jun 4, 2020

@GrahamcOfBorg eval

@FRidh
Copy link
Member Author

FRidh commented Jun 4, 2020

I fail to see how this can still be an issue.

No point for the bootstrapping.
(
if pythonAtLeast "3.8" then
fetchpatch {
url = "https://salsa.debian.org/cpython-team/python3/-/raw/3.8.3rc1-1/debian/patches/link-opt.diff";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these are files in git, not generated files so fetchurl should be sufficient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it should be, yet ofborg complains.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the error even on a337c44 and it points to the removed line 🤷‍♀️

@jtojnar
Copy link
Contributor

jtojnar commented Jun 5, 2020

@GrahamcOfBorg eval

@FRidh FRidh merged commit 4f52dfe into NixOS:staging Jun 5, 2020
Staging automation moved this from WIP to Done Jun 5, 2020
@FRidh
Copy link
Member Author

FRidh commented Jun 5, 2020

Let's see how it behaves with other PR's.

@gnprice
Copy link
Contributor

gnprice commented Jun 6, 2020

Sorry these changes caused things to fail!

I think I don't yet follow what the errors were. Is there a place I can see what ofborg said about this version, or a way I can reproduce it locally?

It looks like with this PR, the PGO (worth a ~16% speedup in my measurements) is disabled for python3Minimal but still active for the other builds, and the linker optimization (worth ~6%) is reverted for all builds.

If fetchpatch and fetchurl aren't an option, I'd be happy to revive a version of the linker optimization that uses patches in the tree, like we do for a number of other patches. But it seems like at least fetchurl ought to be available, so I'm also interested in trying to resolve what goes wrong with it.

@doronbehar
Copy link
Contributor

I also didn't understand what went on here. @FRidh you wrote:

fetchpatch is causing trouble

But in this PR you removed the patches themselves - you didn't change the way they were fetched.

@FRidh
Copy link
Member Author

FRidh commented Jun 6, 2020

@doronbehar Yes, they can be added back. I needed a way to get staging building again asap, and as I wrote

I fail to see how this can still be an issue.

it turned out to be two issues at the same time (solution 913bee3) and ofborg giving the same error while that was not possible (#89489 (comment)) . So, reverting this can be undone as long as fetchurl is used.

@gnprice actually the PR was fine, the issue was that I merged it after I made Python 3.8 the default interpreter, and did not let ofborg check it again.

@FRidh FRidh deleted the opt branch June 6, 2020 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants