[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <15bcb208-3ccb-4d99-853b-545626914373@molgen.mpg.de>
Date: Mon, 25 Aug 2025 17:42:05 +0200
From: Paul Menzel <pmenzel@...gen.mpg.de>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: How to deal with increased install size with
`CONFIG_DEBUG_INFO_BTF=y`
Dear Linux folks,
Trying to get ptcpdump [1] running, I needed to build Linux with BTF
symbols.
```
@@ -5985,11 +5986,22 @@
#
# Compile-time checks and compiler options
#
+CONFIG_DEBUG_INFO=y
CONFIG_AS_HAS_NON_CONST_ULEB128=y
-CONFIG_DEBUG_INFO_NONE=y
+# CONFIG_DEBUG_INFO_NONE is not set
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set
-# CONFIG_DEBUG_INFO_DWARF5 is not set
+CONFIG_DEBUG_INFO_DWARF5=y
+# CONFIG_DEBUG_INFO_REDUCED is not set
+CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
+# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
+# CONFIG_DEBUG_INFO_SPLIT is not set
+CONFIG_DEBUG_INFO_BTF=y
+CONFIG_PAHOLE_HAS_SPLIT_BTF=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_DEBUG_INFO_BTF_MODULES=y
+# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
+# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
```
This increased the module size quite a bit:
$ du -sh /lib/modules/6.12.4*
128M /lib/modules/6.12.40.mx64.484
1.9G /lib/modules/6.12.43.mx64.485
Searching the WWW, it was suggested to run `INSTALL_MOD_STRIP=1` [2],
bringing it down to 137 MB:
137M /lib/modules/6.12.43.mx64.486
I was under the expression, that BTF symbols are small compared to the
debug symbol types from the past. (Excuse my ignorance about the
terminology and subject.) Is `INSTALL_MOD_STRIP=1` the “recommended” way
to still use BPF/BTF on production systems.
Kind regards,
Paul
[1]: https://github.com/mozillazg/ptcpdump
[2]:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28218/diffs
Powered by blists - more mailing lists