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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 176C6C433DF for ; Thu, 21 May 2020 21:57:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE9E320748 for ; Thu, 21 May 2020 21:57:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dXPScmAf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730542AbgEUV5t (ORCPT ); Thu, 21 May 2020 17:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729370AbgEUV5r (ORCPT ); Thu, 21 May 2020 17:57:47 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A731DC05BD43 for ; Thu, 21 May 2020 14:57:47 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id t8so1882068pju.3 for ; Thu, 21 May 2020 14:57:47 -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=TSxKnnFyDzr5TIHifuloj5+MkU6+ljp348ta4rzKVFY=; b=dXPScmAfnnkj9oY/tpSN6s3fJBAyh5t4mLgKXCVK2k9C2HWkYwHDlsyOSnA66Lc1wL DB+PCswLKQvb4ERWbQ7d0MauTLwD7VmEJpoB7iOvzLNhLgb+v9MM2ALex8qL7yejKFC8 zvEv3AJh5U/NYpcqCbu1Ca5zJfJwz3GiybXXZvONi1eKvlg60oi01n7PO7EABV7ACRWG QBARStGvuBoTIjbo4OPEhppS9Qm8kjrvgzbdn6C35l+0fF14fiS/8liemSwfPkOZ6jW8 bz1oCACwbRm+9e2WjFxNJ3h4LDE8kksrFNNiV75bZu5rWCaREs3htKCCpPLgzd2IelvM bGxQ== 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=TSxKnnFyDzr5TIHifuloj5+MkU6+ljp348ta4rzKVFY=; b=beU7nQjveDRC8Xr+kVlWSRnm0rShEUzjKtCx4QWxPYjsYsU3DwuPw3EYicDLkM1BSj Zj2eiRZatmi/LRpUJTC82mp0oE819IuH4jTvi7DJpIyU/SIhf6/t0ofSgNZa+09eLgsH IL0qS7d9vAe3vHtPXSWaKT460zkxzRc9ewVka+sjXZXjaMQu+dRe1JqsFFc2jGH6vvX+ 6Jj9esInQVNSsNsQVG9s2PrK7BnpWch+1J/6QPkUae8XpJbXaBakgzjof3QXiS5ixPZ4 aRIV7kSgDfUd2J/NKMnGNzVyxxYgwivJ7tThp7+VjzNZ9eQotj/9Ho0P/lsbNs+TzinK PSHA== X-Gm-Message-State: AOAM530H7BpU/eVej8LUU3N5Gplu3au967otlwx4RAkCgYTq2E2OM8Bp 2PIHAsxrSd2XhNmMNaW/Km5IzEf1MLDIJDhL6MhSDQ== X-Google-Smtp-Source: ABdhPJwcxYwlDtUvYmfrQ2zA/sDeHoaekf+9/G8kXzhN7oimGZllsEK1KOn7uZZQ+Ay0tgfc5cAMR+k+4Sfd9KxH1yU= X-Received: by 2002:a17:90b:4c47:: with SMTP id np7mr679103pjb.101.1590098266861; Thu, 21 May 2020 14:57:46 -0700 (PDT) MIME-Version: 1.0 References: <10f4fb0b-1012-b0e6-af05-0aa5a906de21@redhat.com> <20200520193637.6015-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Thu, 21 May 2020 14:57:34 -0700 Message-ID: Subject: Re: [PATCH v2] Makefile: support compressed debug info To: Masahiro Yamada Cc: Sedat Dilek , Fangrui Song , Nick Clifton , David Blaikie , Michal Marek , Andrew Morton , Changbin Du , Randy Dunlap , Stephen Rothwell , Mauro Carvalho Chehab , Anshuman Khandual , Krzysztof Kozlowski , Linux Kbuild mailing list , Linux Kernel Mailing List , 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 Wed, May 20, 2020 at 7:48 PM Masahiro Yamada wrote: > > > Suggested-by: Fangrui Song > > > Suggested-by -> Reviewed-by > > https://patchwork.kernel.org/patch/11524939/#23349551 Yes, my mistake. > > Suggested-by: Nick Clifton > > > I do not know where this tag came from. > > Nick Clifton taught us the version rule of binutils,but did not state > anything about this patch itself. > > https://patchwork.kernel.org/patch/11524939/#23355175 > > > > Suggested-by: Sedat Dilek > > I do not see the source of this tag, either... Not all contributions to open source need to be in the form of patches. Both Sedat and Nick gave suggestions which ultimately informed the contents of this patch. They should be rewarded for their efforts, and incentivized to help improve the code base further. I think suggested by tags are a good way to do that; but if it's against a written convention or if you still disagree, it's not the end of the world to me, and you may drop those tags from the v3. > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -225,6 +225,21 @@ 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,--compress-debug-sections=zlib) > > This does not work. (always false) Technically, always true. `-Wa` disables all warnings from the assembler. Also, I did test this via `make menuconfig`. > You cannot enable this option. > > The comma between -Wa and --compress-debug-sections=zlib > is eaten by Kconfig parser because commas are delimiters > of function parameters. > > > Please write like this. > > depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib) You're right, I knew this bug forgot. Will fix in v3. > > + 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 > > + wish to set the $KDEB_COMPRESS env var to "none" to avoid recompressing > > + the debug info again with a different compression scheme, which can > > + result in larger binaries. > > No. This is not correct. > > CONFIG_DEBUG_INFO_COMPRESSED compresses the only debug info part. > The other parts still get by benefit from the default KDEB_COMPRESS=xz. > > > The numbers are here: > > > CONFIG_DEBUG_INFO_COMPRESSED=y > -rw-r--r-- 1 masahiro masahiro 209077584 May 21 11:19 > linux-image-5.7.0-rc5+-dbg_5.7.0-rc5+-26_amd64.deb > > > CONFIG_DEBUG_INFO_COMPRESSED=y and KDEB_COMPRESS=none > -rw-r--r-- 1 masahiro masahiro 643051712 May 21 11:22 > linux-image-5.7.0-rc5+-dbg_5.7.0-rc5+-27_amd64.deb > > > CONFIG_DEBUG_INFO_COMPRESSED=n > -rw-r--r-- 1 masahiro masahiro 112200308 May 21 11:40 > linux-image-5.7.0-rc5+-dbg_5.7.0-rc5+-30_amd64.deb > > > > > For the deb package size perspective, > it is better to keep KDEB_COMPRESS as default. > > The main motivation for changing KDEB_COMPRESS > is the build speed. (see commit 1a7f0a34ea7d05) > > > > > CONFIG_DEBUG_INFO_COMPRESSED has a downside > for the debug deb package, but we need to accept it. Ah, I see. Thank you for those measurements. I'll send a v3 with fixed up help text, but ultimately, I don't really care what it says here. Please feel empowered to reword it should you choose to accept + apply it. -- Thanks, ~Nick Desaulniers