Re: [PATCH 2/2] btf: Add the option to include global variable types
Alexei Starovoitov <[email protected]> Fri, 7 Feb 2025 15:50:31 -0800
| Newsgroups | org.kernel.vger.linux-debuggers,org.kernel.vger.bpf,org.kernel.vger.linux-arch,org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAADnVQLiyezBW34dhkwZw+mWmkFAYMZUdHbOa4uYCdPbgS10SQ@mail.gmail.com> |
On Thu, Feb 6, 2025 at 5:21 PM Stephen Brennan <[email protected]> wrote: > When the feature was implemented in pahole, my measurements indicated > that vmlinux BTF size increased by about 25.8%, and module BTF size > increased by 53.2%. Due to these increases, the feature is implemented > behind a new config option, allowing users sensitive to increased memory > usage to disable it. > ... > +config DEBUG_INFO_BTF_GLOBAL_VARS > + bool "Generate BTF type information for all global variables" > + default y > + depends on DEBUG_INFO_BTF && PAHOLE_VERSION >= 128 > + help > + Include type information for all global variables in the BTF. This > + increases the size of the BTF information, which increases memory > + usage at runtime. With global variable types available, runtime > + debugging and tracers may be able to provide more detail. This is not a solution. Even if it's changed to 'default n' distros will enable it like they enable everything and will suffer a regression. We need to add a new module like vmlinux_btf.ko that will contain this additional BTF data. For global vars and everything else we might need. pw-bot: cr