All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Fangrui Song <maskray@google.com>,
	Nick Desaulniers <nick.desaulniers@gmail.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Changbin Du <changbin.du@intel.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Clang-Built-Linux ML <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] Makefile: support compressed debug info
Date: Wed, 13 May 2020 18:33:30 +0200	[thread overview]
Message-ID: <CA+icZUUzLORp_TvDZiLO4WOdwEHTZF9vpi9BTHwQm-S3KDtMBw@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNATm2r9pH7i=pe3e7WvNmumGnivn05J+Mz10DzrzB8i=hw@mail.gmail.com>

On Wed, May 13, 2020 at 4:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Nick,
>
> On Wed, May 13, 2020 at 4:23 AM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers
> > > > ><nick.desaulniers@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.
>
>
>
> As Sedat explained, deb package data
> is compressed by xz, which is default.
>
> You can use another compression method,
> or disable compression if you desire.
>
>
>
> "man dpkg-deb" says as follows:
>
>  -Zcompress-type
>       Specify which compression type to use when building a package.
>       Allowed  values  are  gzip,  xz  (since  dpkg  1.15.6), and none
>       (default is xz).
>
>
>
> Kbuild supports KDEB_COMPRESS variable
> to change the compression method.
> See line 46 of scripts/package/builddeb.
>

Hi Masahiro,

thanks for the clarification and the informations.

With next RC I will add KDEB_COMPRESS=gzip to my build-script and report.

Regards,
- Sedat -

>
> If you are interested,
> try "make bindeb-pkg" with/without CONFIG_DEBUG_INFO_COMPRESSED,
> and compare the size of the generated debug package.
>
>
>
>
> As Sedat stated,
>
> (plain data) -> compress by gzip  ->  compress by xz
>
>    is often less efficient than
>
> (plain data) -> compress by xz
>
>
>
> I hope this is clearer.
>
>
>
>
>
>
>
>
> > Fangrui, I wasn't able to easily find what version of binutils first
> > added support.  Can you please teach me how to fish?
> >
> > Another question I had for Fangrui is, if the linker can compress
> > these sections, shouldn't we just have the linker do it, not the the
> > compiler and assembler?  IIUC the debug info can contain relocations,
> > so the linker would have to decompress these, perform relocations,
> > then recompress these?  I guess having the compiler and assembler
> > compress the debug info as well would minimize the size of the .o
> > files on disk.
> >
> > Otherwise I should add this flag to the assembler invocation, too, in
> > v2.  Thoughts?
> >
> > I have a patch series that enables dwarf5 support in the kernel that
> > I'm working up to.  I wanted to send this first.  Both roughly reduce
> > the debug info size by 20% each, though I haven't measured them
> > together, yet.  Requires ToT binutils because there have been many
> > fixes from reports of mine recently.
> > --
> > Thanks,
> > ~Nick Desaulniers
>
>
>
> --
> Best Regards
> Masahiro Yamada

  reply	other threads:[~2020-05-13 16:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  3:13 [PATCH] Makefile: support compressed debug info Nick Desaulniers
2020-05-04 16:25 ` Sedat Dilek
2020-05-05  0:47   ` Fangrui Song
2020-05-12  5:53     ` Masahiro Yamada
2020-05-12 19:23       ` Nick Desaulniers
2020-05-12 20:01         ` Fangrui Song
2020-05-12 20:06           ` Sedat Dilek
2020-05-13 19:00           ` Nick Desaulniers
2020-05-14 11:34             ` Nick Clifton
2020-05-20 19:36               ` [PATCH v2] " Nick Desaulniers
2020-05-20 23:21                 ` Nick Desaulniers
2020-05-20 23:22                 ` Andrew Morton
2020-05-21  2:47                 ` Masahiro Yamada
2020-05-21 21:57                   ` Nick Desaulniers
2020-05-21 22:00                     ` [PATCH v3] " Nick Desaulniers
2020-05-22 11:56                       ` Sedat Dilek
2020-05-26 10:26                       ` Masahiro Yamada
2020-05-26 15:53                         ` Nick Desaulniers
2020-05-26 16:15                           ` Masahiro Yamada
2020-05-26 17:03                             ` [PATCH v4] " Nick Desaulniers
2020-05-26 17:03                               ` Nick Desaulniers
2020-05-26 17:06                               ` Nick Desaulniers
2020-05-26 17:06                                 ` Nick Desaulniers
2020-05-26 17:18                             ` [PATCH v5] " Nick Desaulniers
2020-05-24  3:56                     ` [PATCH v2] " Masahiro Yamada
2020-05-24  7:48                       ` Sedat Dilek
2020-05-26 15:58                         ` Nick Desaulniers
2020-05-12 20:02         ` [PATCH] " Sedat Dilek
2020-05-13  2:51         ` Masahiro Yamada
2020-05-13 16:33           ` Sedat Dilek [this message]
2020-05-12  5:46   ` Masahiro Yamada
2020-05-12  8:59     ` Sedat Dilek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+icZUUzLORp_TvDZiLO4WOdwEHTZF9vpi9BTHwQm-S3KDtMBw@mail.gmail.com \
    --to=sedat.dilek@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=changbin.du@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=krzk@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=maskray@google.com \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    --cc=nick.desaulniers@gmail.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.