-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
zfs: strip debug symbols (closure size) #141942
Conversation
initrd-linux: -12427.8 KiB linux: -12419.3 KiB nc2k9ym14spzz2pgq6hn84k8k9zgf686: ∅ → ε, +102451.2 KiB nixos-system-turingmachine: 21.11.20211015.a2dcfa2 → 21.11.20211017.c6f77b7 visjwxsjqmh8c9lxnrxsw5w19zszflm6: ε → ∅, -102451.0 KiB zfs-kernel: -12419.3 KiB
How come the normal strip hook wasn't catching this? |
Oh, I guess because it gets compressed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, back down to the size it was before.
postBuild = optionalString buildKernel '' | ||
find . -name "*.ko" -print0 | xargs -0 -P$NIX_BUILD_CORES strip --strip-debug | ||
''; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a comment here explaining why this is necessary
@@ -140,6 +140,10 @@ let | |||
"INSTALL_MOD_PATH=\${out}" | |||
]; | |||
|
|||
postBuild = optionalString buildKernel '' | |||
find . -name "*.ko" -print0 | xargs -0 -P$NIX_BUILD_CORES strip --strip-debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it guaranteed that NIX_BUILD_CORES
will always be non-empty? Otherwise this might be better:
find . -name "*.ko" -print0 | xargs -0 -P$NIX_BUILD_CORES strip --strip-debug | |
find . -name "*.ko" -print0 | xargs -0 -P''${NIX_BUILD_CORES:-1} strip --strip-debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICS this PR has broken
|
strip should be present, if it's not, then that's more of an issue with pkgsCross. |
This hardcodes strip but you should not use |
@martinetd thanks, using
I've submitted #143539 for merging that fix. |
Since we enabled BTF the zfs module size became significantly larger due to included debug symbols.
Closure size changes on my system when upgrading:
initrd-linux: -12427.8 KiB
linux: -12419.3 KiB
nc2k9ym14spzz2pgq6hn84k8k9zgf686: ∅ → ε, +102451.2 KiB
nixos-system-turingmachine: 21.11.20211015.a2dcfa2 → 21.11.20211017.c6f77b7
visjwxsjqmh8c9lxnrxsw5w19zszflm6: ε → ∅, -102451.0 KiB
zfs-kernel: -12419.3 KiB
Fixes #140851
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)