From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82684C433DF for ; Tue, 26 May 2020 17:06:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5830F206F1 for ; Tue, 26 May 2020 17:06:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UdZGabkJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728731AbgEZRGd (ORCPT ); Tue, 26 May 2020 13:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbgEZRGd (ORCPT ); Tue, 26 May 2020 13:06:33 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB955C03E96D for ; Tue, 26 May 2020 10:06:32 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id d3so8933550pln.1 for ; Tue, 26 May 2020 10:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yb9QT1BIGxbozBy7yF1mKLzqcCaPwhboIB/ytOSzJpQ=; b=UdZGabkJVa0wzWxrWfharb1kxzKGM4Y463N+PFR8wMMgcgEjj6hTFDfGbnZRum1uh1 tmAKWcBu+ylRfRSkQ+4Xx717XgyVabh4nDigz2ez38ANaT0cLrO2nqyr0H+ZUlYxHdlY X8kTbaA+yRWLtdRPdVS3ogoEGYlyImGKxHc5oiCyRuWQe2QwSLQ6Op7tpFQJapMIJqss nuDmpF7KnKG8sw8qAJTw04wb3H3Wg8wbpwBhtS5BhahWQdRSNG3nXd3k1L4uCyFinrS1 ay4UfHI4OU4HFnlGruXsqbDPbtp6Gr0WH9lL8TpJur7i1hbTqFoPaR2daJ6zn6ZxydOi f91A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yb9QT1BIGxbozBy7yF1mKLzqcCaPwhboIB/ytOSzJpQ=; b=d8zGnWKMuFZNBDWsOhQPNWSJszjUfI4rZIr1r4gaJlR2zEy5zabitauUwYzD6lEg7z 8XedcMUGIhJ2TAYZ3xPhLNHW6ej8dAoMIgmT9IC0NRGokAx5+9awXEVU7qpgUGefsnrC g0TL2PXwnz652lA8kw3b+MZpJ+Db++9aKvXDiN2F9iuNsVLioOwbXB/fK3Le2aXsw7sb XH8eIJGYYoo3YH9QFfaZ/kjD4cDAO+q1clb/HaENaKC2gVS2eRVgoViTr1SKSuzheeuB FKEWaHmHTTCEzPztWpbI7d9o9qEmCoR1iaGxi/V0eexSZowctEQTU1YnS5zgrhyHit56 oh0Q== X-Gm-Message-State: AOAM532RALRj4ANdZgjcScJdTRAd9MlmbM9d7GTS5M5P4/S3nsqEZAB2 8LOcaiOVp1NAeYUcsyo4DYYsAz11AOxgk03W442LKg== X-Google-Smtp-Source: ABdhPJzy7oPT9Vxg1G984MIMfYj6SSHBB82uHALxBcM7F41GuoDw5r4z/56EdMdBL4gN2tY4GLHbs33jdrPBZ7Xd+Qo= X-Received: by 2002:a17:902:341:: with SMTP id 59mr1859397pld.119.1590512792072; Tue, 26 May 2020 10:06:32 -0700 (PDT) MIME-Version: 1.0 References: <20200526170321.137238-1-ndesaulniers@google.com> In-Reply-To: <20200526170321.137238-1-ndesaulniers@google.com> From: Nick Desaulniers Date: Tue, 26 May 2020 10:06:20 -0700 Message-ID: Subject: Re: [PATCH v4] Makefile: support compressed debug info To: Masahiro Yamada Cc: Sedat Dilek , Fangrui Song , Nick Clifton , David Blaikie , Michal Marek , Catalin Marinas , Will Deacon , Vincenzo Frascino , Thomas Gleixner , Naohiro Aota , Andrew Morton , Changbin Du , Randy Dunlap , Stephen Rothwell , Anshuman Khandual , Mauro Carvalho Chehab , Krzysztof Kozlowski , Linux Kbuild mailing list , LKML , Linux ARM , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 10:03 AM Nick Desaulniers 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. > > All of the debug sections will have a `C` flag set. > $ readelf -S > > $ bloaty vmlinux.gcc75.compressed.dwarf4 -- \ > vmlinux.gcc75.uncompressed.dwarf4 > > FILE SIZE VM SIZE > -------------- -------------- > +0.0% +18 [ = ] 0 [Unmapped] > -73.3% -114Ki [ = ] 0 .debug_aranges > -76.2% -2.01Mi [ = ] 0 .debug_frame > -73.6% -2.89Mi [ = ] 0 .debug_str > -80.7% -4.66Mi [ = ] 0 .debug_abbrev > -82.9% -4.88Mi [ = ] 0 .debug_ranges > -70.5% -9.04Mi [ = ] 0 .debug_line > -79.3% -10.9Mi [ = ] 0 .debug_loc > -39.5% -88.6Mi [ = ] 0 .debug_info > -18.2% -123Mi [ = ] 0 TOTAL > > $ bloaty vmlinux.clang11.compressed.dwarf4 -- \ > vmlinux.clang11.uncompressed.dwarf4 > > FILE SIZE VM SIZE > -------------- -------------- > +0.0% +23 [ = ] 0 [Unmapped] > -65.6% -871 [ = ] 0 .debug_aranges > -77.4% -1.84Mi [ = ] 0 .debug_frame > -82.9% -2.33Mi [ = ] 0 .debug_abbrev > -73.1% -2.43Mi [ = ] 0 .debug_str > -84.8% -3.07Mi [ = ] 0 .debug_ranges > -65.9% -8.62Mi [ = ] 0 .debug_line > -86.2% -40.0Mi [ = ] 0 .debug_loc > -42.0% -64.1Mi [ = ] 0 .debug_info > -22.1% -122Mi [ = ] 0 TOTAL > > For x86_64 defconfig + LLVM=1 (before): > Elapsed (wall clock) time (h:mm:ss or m:ss): 3:22.03 > Maximum resident set size (kbytes): 43856 > > For x86_64 defconfig + LLVM=1 (after): > Elapsed (wall clock) time (h:mm:ss or m:ss): 3:32.52 > Maximum resident set size (kbytes): 1566776 > > Thanks to: > Nick Clifton helped us to provide the minimal binutils version. > Sedat Dilet found an increase in size of debug .deb package. > > Cc: Nick Clifton > Cc: Sedat Dilek > Suggested-by: David Blaikie > Reviewed-by: Fangrui Song > Tested-by: Sedat Dilek > Signed-off-by: Nick Desaulniers > --- > Changes V3 -> V4: > * Add thanks line to commit message as per Masahiro. > * Swap Sugguested-by to Cc for two lines in commit message, as per > Masahiro. > > Changes V2 -> V3: > * Fix blaikie@'s email addr. > * Fix Fangrui's Reviewed-by tag as per Masahiro. > * Fix help text as per Masahiro. > * Fix -Wa$(comma)foo as per Masahiro. > > Changes V1 -> V2: > * rebase on linux-next. > * Add assembler flags as per Fangrui. > * Add note about KDEB_COMPRESS+scripts/package/builddeb > as per Sedat and Masahiro. > * Add note about bintutils version requirements as per Nick C. > * Add note about measured increased build time and max RSS. > > Makefile | 6 ++++++ > arch/arm64/kernel/vdso32/Makefile | 2 +- Sorry, I was wondering why Will and TGLX got cc'ed. My tree was dirty when I amended ... was carrying another patch to send, please disregard v4, and sorry for the noise. > lib/Kconfig.debug | 17 +++++++++++++++++ > 3 files changed, 24 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 71687bfe1cd9..be8835296754 100644 > --- a/Makefile > +++ b/Makefile > @@ -822,6 +822,12 @@ DEBUG_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ > $(call cc-option,-fno-var-tracking) > endif > > +ifdef CONFIG_DEBUG_INFO_COMPRESSED > +DEBUG_CFLAGS += -gz=zlib > +KBUILD_AFLAGS += -Wa,--compress-debug-sections=zlib > +KBUILD_LDFLAGS += --compress-debug-sections=zlib > +endif > + > KBUILD_CFLAGS += $(DEBUG_CFLAGS) > export DEBUG_CFLAGS > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > index 3964738ebbde..5fd7792d03fc 100644 > --- a/arch/arm64/kernel/vdso32/Makefile > +++ b/arch/arm64/kernel/vdso32/Makefile > @@ -135,7 +135,7 @@ c-obj-vdso-gettimeofday := vgettimeofday.o > asm-obj-vdso := sigreturn.o > > ifneq ($(c-gettimeofday-y),) > -VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y) > +VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y) -marm > endif > > VDSO_CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index b8f023e054b9..7fc82dcf814b 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -225,6 +225,23 @@ config DEBUG_INFO_REDUCED > DEBUG_INFO build and compile times are reduced too. > Only works with newer gcc versions. > > +config DEBUG_INFO_COMPRESSED > + bool "Compressed debugging information" > + depends on DEBUG_INFO > + depends on $(cc-option,-gz=zlib) > + depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib) > + depends on $(ld-option,--compress-debug-sections=zlib) > + help > + Compress the debug information using zlib. Requires GCC 5.0+ or Clang > + 5.0+, binutils 2.26+, and zlib. > + > + Users of dpkg-deb via scripts/package/builddeb may find an increase in > + size of their debug .deb packages with this config set, due to the > + debug info being compressed with zlib, then the object files being > + recompressed with a different compression scheme. But this is still > + preferable to setting $KDEB_COMPRESS to "none" which would be even > + larger. > + > config DEBUG_INFO_SPLIT > bool "Produce split debuginfo in .dwo files" > depends on DEBUG_INFO > -- > 2.27.0.rc0.183.gde8f92d652-goog > -- Thanks, ~Nick Desaulniers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86842C433E0 for ; Tue, 26 May 2020 17:06:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50E08206F1 for ; Tue, 26 May 2020 17:06:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LfT8fgfB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="UdZGabkJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50E08206F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w22NvVn9uXWxt/ofGYLomM3iNSPUqFTUgYvNtDkCDUM=; b=LfT8fgfBc1xwLN gssBaX6DLSsHtDbV9VRLJPxYObO2+3y50jlgwF2wT0TLZqC6u9K8vn9g38lbeyyORBb1HDcEuuc5p tVHZmR3uUyEIV5r0+9SyNvWCVDga5gvMUJ5pgFvF40ZAINWhusBVnFAjam8W6Kr1hjHNpAqYNKygX 11MyQ2s6FMWbCwqmR8aeEod+Y8PkuwWUvurCf1OXPxajv3PDUO7MnYtSHKY26d+5jKP+acTOxbXs4 zS8FfyWe5ysDo7QweUiRbkNk/tvHCc3SbCBp7xmweeHzK9w1BvIbBd7tNFxU9J9wyYFC7Qw64BBud 4CwJ7i6XSqOuM8VikHWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdd2H-0006AJ-Ai; Tue, 26 May 2020 17:06:41 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdd2E-00069I-BQ for linux-arm-kernel@lists.infradead.org; Tue, 26 May 2020 17:06:39 +0000 Received: by mail-pl1-x644.google.com with SMTP id t16so8914800plo.7 for ; Tue, 26 May 2020 10:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yb9QT1BIGxbozBy7yF1mKLzqcCaPwhboIB/ytOSzJpQ=; b=UdZGabkJVa0wzWxrWfharb1kxzKGM4Y463N+PFR8wMMgcgEjj6hTFDfGbnZRum1uh1 tmAKWcBu+ylRfRSkQ+4Xx717XgyVabh4nDigz2ez38ANaT0cLrO2nqyr0H+ZUlYxHdlY X8kTbaA+yRWLtdRPdVS3ogoEGYlyImGKxHc5oiCyRuWQe2QwSLQ6Op7tpFQJapMIJqss nuDmpF7KnKG8sw8qAJTw04wb3H3Wg8wbpwBhtS5BhahWQdRSNG3nXd3k1L4uCyFinrS1 ay4UfHI4OU4HFnlGruXsqbDPbtp6Gr0WH9lL8TpJur7i1hbTqFoPaR2daJ6zn6ZxydOi f91A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yb9QT1BIGxbozBy7yF1mKLzqcCaPwhboIB/ytOSzJpQ=; b=oG4k5PNY6ysbbtwpOnB13kbCz8CGQuLWFZca627GgBssyW2Ny+4f0roZfDjb+ygFtR HOheDNfmMclWYQJd8WqquBFkz7XhwRyAyCD8FfKFzYj2dUv7aN4ge1epIi2Y98P6MFLz Hiu8ag5gyyCTxNbwYHonNTAjdhq7FrpjWr17wcRCjgyOsdIZoVHH5MWkucMlZQvIC+8l 9Vye437ZLRMcw2s8chpcqSHEXeiiMe3yUt+s7+pBNa3epUJEJoNKljOGYHIs1kVQIrGd yoZaUhX9dd30Pn2it6/y6C5IJyD8ugyd2SBBiRD85YNZhzIUTHH6ANue0AZqc4ku41QM WYtg== X-Gm-Message-State: AOAM530A3N0dhamD4uQNxgMGtE9WFSHSiPc725uppIb91+cFt5xSlmKX cvUMmEeirsNEU9o7NF2Kgxsblxp22pIC/Xxri6sXIg== X-Google-Smtp-Source: ABdhPJzy7oPT9Vxg1G984MIMfYj6SSHBB82uHALxBcM7F41GuoDw5r4z/56EdMdBL4gN2tY4GLHbs33jdrPBZ7Xd+Qo= X-Received: by 2002:a17:902:341:: with SMTP id 59mr1859397pld.119.1590512792072; Tue, 26 May 2020 10:06:32 -0700 (PDT) MIME-Version: 1.0 References: <20200526170321.137238-1-ndesaulniers@google.com> In-Reply-To: <20200526170321.137238-1-ndesaulniers@google.com> From: Nick Desaulniers Date: Tue, 26 May 2020 10:06:20 -0700 Message-ID: Subject: Re: [PATCH v4] Makefile: support compressed debug info To: Masahiro Yamada X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200526_100638_396584_CD86834D X-CRM114-Status: GOOD ( 22.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Naohiro Aota , Stephen Rothwell , Michal Marek , Nick Clifton , Fangrui Song , Anshuman Khandual , Mauro Carvalho Chehab , Catalin Marinas , Randy Dunlap , LKML , Krzysztof Kozlowski , Changbin Du , Linux ARM , clang-built-linux , Sedat Dilek , David Blaikie , Thomas Gleixner , Vincenzo Frascino , Will Deacon , Andrew Morton , Linux Kbuild mailing list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 26, 2020 at 10:03 AM Nick Desaulniers 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. > > All of the debug sections will have a `C` flag set. > $ readelf -S > > $ bloaty vmlinux.gcc75.compressed.dwarf4 -- \ > vmlinux.gcc75.uncompressed.dwarf4 > > FILE SIZE VM SIZE > -------------- -------------- > +0.0% +18 [ = ] 0 [Unmapped] > -73.3% -114Ki [ = ] 0 .debug_aranges > -76.2% -2.01Mi [ = ] 0 .debug_frame > -73.6% -2.89Mi [ = ] 0 .debug_str > -80.7% -4.66Mi [ = ] 0 .debug_abbrev > -82.9% -4.88Mi [ = ] 0 .debug_ranges > -70.5% -9.04Mi [ = ] 0 .debug_line > -79.3% -10.9Mi [ = ] 0 .debug_loc > -39.5% -88.6Mi [ = ] 0 .debug_info > -18.2% -123Mi [ = ] 0 TOTAL > > $ bloaty vmlinux.clang11.compressed.dwarf4 -- \ > vmlinux.clang11.uncompressed.dwarf4 > > FILE SIZE VM SIZE > -------------- -------------- > +0.0% +23 [ = ] 0 [Unmapped] > -65.6% -871 [ = ] 0 .debug_aranges > -77.4% -1.84Mi [ = ] 0 .debug_frame > -82.9% -2.33Mi [ = ] 0 .debug_abbrev > -73.1% -2.43Mi [ = ] 0 .debug_str > -84.8% -3.07Mi [ = ] 0 .debug_ranges > -65.9% -8.62Mi [ = ] 0 .debug_line > -86.2% -40.0Mi [ = ] 0 .debug_loc > -42.0% -64.1Mi [ = ] 0 .debug_info > -22.1% -122Mi [ = ] 0 TOTAL > > For x86_64 defconfig + LLVM=1 (before): > Elapsed (wall clock) time (h:mm:ss or m:ss): 3:22.03 > Maximum resident set size (kbytes): 43856 > > For x86_64 defconfig + LLVM=1 (after): > Elapsed (wall clock) time (h:mm:ss or m:ss): 3:32.52 > Maximum resident set size (kbytes): 1566776 > > Thanks to: > Nick Clifton helped us to provide the minimal binutils version. > Sedat Dilet found an increase in size of debug .deb package. > > Cc: Nick Clifton > Cc: Sedat Dilek > Suggested-by: David Blaikie > Reviewed-by: Fangrui Song > Tested-by: Sedat Dilek > Signed-off-by: Nick Desaulniers > --- > Changes V3 -> V4: > * Add thanks line to commit message as per Masahiro. > * Swap Sugguested-by to Cc for two lines in commit message, as per > Masahiro. > > Changes V2 -> V3: > * Fix blaikie@'s email addr. > * Fix Fangrui's Reviewed-by tag as per Masahiro. > * Fix help text as per Masahiro. > * Fix -Wa$(comma)foo as per Masahiro. > > Changes V1 -> V2: > * rebase on linux-next. > * Add assembler flags as per Fangrui. > * Add note about KDEB_COMPRESS+scripts/package/builddeb > as per Sedat and Masahiro. > * Add note about bintutils version requirements as per Nick C. > * Add note about measured increased build time and max RSS. > > Makefile | 6 ++++++ > arch/arm64/kernel/vdso32/Makefile | 2 +- Sorry, I was wondering why Will and TGLX got cc'ed. My tree was dirty when I amended ... was carrying another patch to send, please disregard v4, and sorry for the noise. > lib/Kconfig.debug | 17 +++++++++++++++++ > 3 files changed, 24 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 71687bfe1cd9..be8835296754 100644 > --- a/Makefile > +++ b/Makefile > @@ -822,6 +822,12 @@ DEBUG_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ > $(call cc-option,-fno-var-tracking) > endif > > +ifdef CONFIG_DEBUG_INFO_COMPRESSED > +DEBUG_CFLAGS += -gz=zlib > +KBUILD_AFLAGS += -Wa,--compress-debug-sections=zlib > +KBUILD_LDFLAGS += --compress-debug-sections=zlib > +endif > + > KBUILD_CFLAGS += $(DEBUG_CFLAGS) > export DEBUG_CFLAGS > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > index 3964738ebbde..5fd7792d03fc 100644 > --- a/arch/arm64/kernel/vdso32/Makefile > +++ b/arch/arm64/kernel/vdso32/Makefile > @@ -135,7 +135,7 @@ c-obj-vdso-gettimeofday := vgettimeofday.o > asm-obj-vdso := sigreturn.o > > ifneq ($(c-gettimeofday-y),) > -VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y) > +VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y) -marm > endif > > VDSO_CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index b8f023e054b9..7fc82dcf814b 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -225,6 +225,23 @@ config DEBUG_INFO_REDUCED > DEBUG_INFO build and compile times are reduced too. > Only works with newer gcc versions. > > +config DEBUG_INFO_COMPRESSED > + bool "Compressed debugging information" > + depends on DEBUG_INFO > + depends on $(cc-option,-gz=zlib) > + depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib) > + depends on $(ld-option,--compress-debug-sections=zlib) > + help > + Compress the debug information using zlib. Requires GCC 5.0+ or Clang > + 5.0+, binutils 2.26+, and zlib. > + > + Users of dpkg-deb via scripts/package/builddeb may find an increase in > + size of their debug .deb packages with this config set, due to the > + debug info being compressed with zlib, then the object files being > + recompressed with a different compression scheme. But this is still > + preferable to setting $KDEB_COMPRESS to "none" which would be even > + larger. > + > config DEBUG_INFO_SPLIT > bool "Produce split debuginfo in .dwo files" > depends on DEBUG_INFO > -- > 2.27.0.rc0.183.gde8f92d652-goog > -- Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel