On Tue, May 12, 2020 at 9:23 PM Nick Desaulniers
<ndesaulni...@google.com> wrote:
>
> On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada <masahi...@kernel.org> wrote:
> >
> > > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers
> > > ><nick.desaulni...@gmail.com> wrote:
> > > >>
> > > >> As debug information gets larger and larger, it helps significantly 
> > > >> save
> > > >> the size of vmlinux images to compress the information in the debug
> > > >> information sections. Note: this debug info is typically split off from
> > > >> the final compressed kernel image, which is why vmlinux is what's used
> > > >> in conjunction with GDB. Minimizing the debug info size should have no
> > > >> impact on boot times, or final compressed kernel image size.
> > > >>
> > Nick,
> >
> > I am OK with this patch.
> >
> > Fangrui provided the minimal requirement for
> > --compress-debug-sections=zlib
> >
> >
> > Is it worth recording in the help text?
> > Do you want to send v2?
>
> Yes I'd like to record that information.  I can also record Sedat's
> Tested-by tag.  Thank you for testing Sedat.
>
> I don't know what "linux-image-dbg file" are, or why they would be
> bigger.  The size of the debug info is the primary concern with this
> config.  It sounds like however that file is created might be
> problematic.
>

Hi Nick,

sorry, I try to explain the magic of "linux-image-dbg file".

In my workflow, I use the "scripts/package/{builddeb,mkdebian}"
shipped with the Linux-kernel as a base to build my Debian packages.

With enabled debugging (CONFIG_DEBUG_INFO=y) a
"linux-image-$KERNELRELEASE-dbg" Debian package is created.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/package/mkdebian#n203

As you can see below...

[ CONFIG_DEBUG_INFO_COMPRESSED=n ]

47      
5.7.0-rc4-1-amd64-clang/linux-image-5.7.0-rc4-1-amd64-clang_5.7.0~rc4-1~bullseye+dileks1_amd64.deb
424     
5.7.0-rc4-1-amd64-clang/linux-image-5.7.0-rc4-1-amd64-clang-dbg_5.7.0~rc4-1~bullseye+dileks1_amd64.deb

[ CONFIG_DEBUG_INFO_COMPRESSED=y ]

47      
5.7.0-rc4-2-amd64-clang/linux-image-5.7.0-rc4-2-amd64-clang_5.7.0~rc4-2~bullseye+dileks1_amd64.deb
771     
5.7.0-rc4-2-amd64-clang/linux-image-5.7.0-rc4-2-amd64-clang-dbg_5.7.0~rc4-2~bullseye+dileks1_amd64.deb

...there is minimal change in the size for the Debian package w/o
debug-infos - approx. 47M.
As said 424M vs. 771M for the dbg packages.

There is another big benefit checking my recorded stats:

$ grep 'cache size' stats/5.7.0-rc4-*/ccache-s.txt
stats/5.7.0-rc4-1-amd64-clang/ccache-s.txt:cache size
         4.7 GB
stats/5.7.0-rc4-1-amd64-clang/ccache-s.txt:max cache size
        10.0 GB
stats/5.7.0-rc4-2-amd64-clang/ccache-s.txt:cache size
         3.4 GB
stats/5.7.0-rc4-2-amd64-clang/ccache-s.txt:max cache size
        10.0 GB

So the cache of ccache is reduced: 4.7 GB vs. 3.4 GB

If you have any questions, "Don't ask to ask - just ask." :-).

Thanks.

Regards,
- Sedat -

Reply via email to