[pacman-dev] [PATCH] makepkg: optionally attach minimal debuginfo to binaries
Levente Polyak
anthraxx at archlinux.org
Tue Feb 16 01:42:22 UTC 2016
==> 0x00: Summary
I think this looks kind of useful, minidebug enabled binaries could help
debugging and understanding certain type of crashes without the need of
rebuilding and install full debug symbols.
Overall the size increase seems to be round about 3% per binary and
slightly higher per tarball (mainly depending on the amount of binaries
it contains).
The mplayer testcase had some strange effects that may need some deeper
investigation before considering to make this a default option.
Binaries with minidebug option and a corresponding .gnu_debugdata
section do not seem to affect reproducibility.
==> 0x01: Patch adjustments
There are some small adjustments required to this patch, I would
recommend the following changes:
1) scripts/libmakepkg/tidy/strip.sh.in
The new minidebug option is required to be added to the
packaging_options array to make it available in the PKGBUILD's options
array:
packaging_options+=('strip' 'debug' 'minidebug')
2) etc/makepkg.conf.in
The new option should to be added to the OPTIONS array in the
configuration file. Its default value should also to be added in the
comment above that option, including a description text between both.
==> 0x02: Backtrace example
Following backtrace example was taken from zsh with default and
minidebug options.
(gdb) bt
#0 0x00007ffff71a0150 in __read_nocancel () from /usr/lib/libc.so.6
#1 0x000000000041c3a7 in bin_read ()
#2 0x000000000041d926 in execbuiltin ()
#3 0x000000000042b59a in ?? ()
#4 0x000000000042bf4e in ?? ()
#5 0x000000000042c311 in ?? ()
#6 0x000000000042db6c in execlist ()
#7 0x000000000045168b in execif ()
#8 0x000000000042a581 in ?? ()
#9 0x000000000042bf4e in ?? ()
#10 0x000000000042c311 in ?? ()
(gdb) bt
#0 0x00007ffff71a0150 in __read_nocancel () from /usr/lib/libc.so.6
#1 0x000000000041c3a7 in bin_read ()
#2 0x000000000041d926 in execbuiltin ()
#3 0x000000000042b59a in execcmd ()
#4 0x000000000042bf4e in execpline2 ()
#5 0x000000000042c311 in execpline ()
#6 0x000000000042db6c in execlist ()
#7 0x000000000045168b in execif ()
#8 0x000000000042a581 in execcmd ()
#9 0x000000000042bf4e in execpline2 ()
#10 0x000000000042c311 in execpline ()
==> 0x03: File size influence
The file size list below roughly matches the expected size increase and
ends up with around 3% bigger binaries. The percentage size increase per
package is obviously higher compared to a single binaries because the
debug sections are already compress.
1) package -> util-linux 8.70%
1.7M 1738096
1.9M 1889416
binary -> hexdump 3.71%
47K 47968
49K 49752
binary -> lsblk 3.26%
76K 77296
78K 79816
binary -> fdisk 2.74%
108K 109640
110K 112640
2) package -> bash 1.14%
1.3M 1271836
1.3M 1286376
binary -> bash 1.86%
773K 791320
788K 806080
3) package -> ncmpcpp 13.75%
610K 624140
694K 710592
binary -> ncmpcpp 3.41%
2.4M 2447816
2.5M 2531440
4) package -> zsh 2.81%
1.8M 1883400
1.9M 1936428
binary -> zsh 1.47%
758K 775592
769K 786968
5) package -> wireshark-gtk 4.49%
641K 655976
670K 685452
binary -> wireshark-gtk 1.48%
2.0M 2068552
2.1M 2099256
6) package -> wireshark-qt 3.25%
2.9M 2983856
3.0M 3080928
binary -> wireshark 1.52%
6.1M 6375200
6.2M 6472216
==> 0x04: Strange observations
Besides the package firefox, where the minidebug option had no effect at
all, there was some strange effect while testing the mplayer package.
The mplayer and memcoder binaries significantly increase in size while
having missing .gnu_debugdata sections. As there may be more cases
affected by this issue, it should maybe be investigated before
considering to enable this by default.
1) mplayer 26.95%
17M 17333304
21M 22005264
2) mencoder 25.96%
16M 16105880
20M 20286256
cheers,
Levente
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20160216/6586ba5a/attachment.asc>
More information about the pacman-dev
mailing list