[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using ‘--strip-all’ instead of ‘--strip-debug’?
From: |
Ludovic Courtès |
Subject: |
Using ‘--strip-all’ instead of ‘--strip-debug’? |
Date: |
Thu, 08 Mar 2018 15:16:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello Guix!
A while back Dave Love (IIRC) suggested stripping binaries with
‘--strip-all’ instead of ‘--strip-debug’. I found traces of a previous
unfruitful experiment in that area as shown in this commit:
commit 7da473b75721e06237b106c6d186f2729117b1ee
Author: Ludovic Courtès <address@hidden>
Date: Mon Dec 29 21:44:48 2014 +0100
gnu: Revert use of '--strip-all'.
This reverts commits f05bdc9412135f34a1c417edc203c35cd005d0d5
and 856ae5e6c71a1283a414d33e638051f95d3cce35.
This broke all sorts of things. See <http://hydra.gnu.org/eval/102058>,
for example.
Unfortunately, the Hydra URL above is no longer available and I have no
idea what broke exactly.
The patch below reverts the revert. I’ve built Coreutils, Git, and Node
on top of ‘core-updates’ with it. Here are the sizes compared to master:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix size git | tail -1
total: 354.6 MiB
$ guix size git | tail -1
total: 364.5 MiB
$ ./pre-inst-env guix build -e '(@@ (gnu packages commencement)
coreutils-final)'
/gnu/store/6mvaqb321wsxgb6v1rddczpd0n4b2x6g-coreutils-8.29-debug
/gnu/store/n7911c84mipr2qjp6vjqj1mbih5xysrk-coreutils-8.29
$ guix size /gnu/store/n7911c84mipr2qjp6vjqj1mbih5xysrk-coreutils-8.29 | tail -1
total: 77.7 MiB
$ guix build -e '(@@ (gnu packages commencement) coreutils-final)'
/gnu/store/l890vkp8mj07r9faglddwkpf7w33w71y-coreutils-8.28-debug
/gnu/store/6i33ik7haav0hd5a797l3llkq04ghx6g-coreutils-8.28
$ guix size /gnu/store/6i33ik7haav0hd5a797l3llkq04ghx6g-coreutils-8.28 | tail -1
total: 78.9 MiB
$ ./pre-inst-env guix size node | tail -1
total: 194.6 MiB
$ guix size node | tail -1
total: 201.9 MiB
--8<---------------cut here---------------end--------------->8---
So we’re talking about a 1.5–3.6% improvement on the whole closures,
which is quite disappointing.
If we look at Coreutils and Git alone (not the closure), we gain 7.3%
and 8.9% respectively (for reference, Coreutils in Debian is at 14.7 MiB
per <https://packages.debian.org/sid/coreutils>):
--8<---------------cut here---------------start------------->8---
$ guix size /gnu/store/n7911c84mipr2qjp6vjqj1mbih5xysrk-coreutils-8.29 | grep
coreutils
/gnu/store/n7911c84mipr2qjp6vjqj1mbih5xysrk-coreutils-8.29 77.7
13.9 17.9%
$ guix size /gnu/store/6i33ik7haav0hd5a797l3llkq04ghx6g-coreutils-8.28 | grep
coreutils
/gnu/store/6i33ik7haav0hd5a797l3llkq04ghx6g-coreutils-8.28 78.9
15.0 19.0%
$ ./pre-inst-env guix size git | grep git-2.16
/gnu/store/f4bwbv3clbyz5snjfbq7wzrxlvj0rwwh-git-2.16.2 354.6
31.4 8.9%
$ guix size git | grep git-2.16
/gnu/store/jwbc0rnn7qa4064bghqs7q8r0bm7v32p-git-2.16.2 364.5
34.5 9.5%
--8<---------------cut here---------------end--------------->8---
We get 9.8% for Node (it’s C++, so it has bigger symbol tables I guess):
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix size node | grep node
/gnu/store/iwdhzvdqjfqfd0m62f6z8a6sxqzb24cr-node-9.4.0 194.6
44.0 22.6%
$ guix size node | grep node
/gnu/store/rk8is4gw40w9dbzj6q3313z7ly34mj62-node-9.4.0 201.9
48.8 24.2%
--8<---------------cut here---------------end--------------->8---
The main downside is unexpected breakage as the 2014 commit above
suggests (would “--strip-debug --strip-unneeded” be safer?).
Thoughts?
Ludo’.
0001-build-system-gnu-Strip-with-strip-all-instead-of-str.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Using ‘--strip-all’ instead of ‘--strip-debug’?,
Ludovic Courtès <=