Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2987926ybk; Tue, 12 May 2020 13:05:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEYGUqEA6l8RuTdrTnYEivmRlIbNxioA/NwVRq09PI+Qv091RfZIz8JBmFNnoI6cpJZYl7 X-Received: by 2002:aa7:d284:: with SMTP id w4mr6450836edq.223.1589313956257; Tue, 12 May 2020 13:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589313956; cv=none; d=google.com; s=arc-20160816; b=JtNui/noWxd+x+HJJA1SbuXBmWImnK73GzCACapWyZbNRx1WFK5aRmtriJdxKGFs5N 8zrCVxu0u4BmW9TNn4DThAlD2m2AaITHoYPM8V0kg7Pm1Tgu06w2fDkKO95VSBT4bu4I XjEN+g9kCyBnGtQF+cl8wE7VlE560y8fAWxwT2J9nooALqJYw+mFaRU7MDUotZBUZiFV AIwf1sdd0yUnEoZ3TfgZcwClXoTMfDZCcCWS0ILdDkGPU/lEE8LE1qNw70sVvrmZy4DP JD35k3MSrv03rklCjVRfXBQTc7VekFUK+w+WIiBz3tCPeqn+Q1RNJHAD54a3pQkXU87V GaQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=ydBNEcd5JjVpqJREhbFVwOQSjJgZ8/B8S4hq59DFYUI=; b=ZXj54NJwW82gsSTYZThmLZIF5hGmWjn7y92A7ZWrOD52K9rlLxlRl981ahDtocvUtl hZYGTAhafvn3s69XEb2gb/HK8mC4avlvqchqRkn8FDjgl/5hN1/7KcpwNzAW/VqjT1GZ zy3uS/54GqeJrARRfXp2cfF/rOLC2KJXv/dQnDL8Ml4P7zUELuNMuHPVVFbIGdfJ6dTe WXI3OAuri/wyFgSmMTzntn7eVCsiqk79PlZT0T3m6Cu1OIiujBLvmL1dU9EeI7QWbt8G EmyvVGGYGHds3foHK8f2/TxM3+ftgeGy1E6K0EqOMhwGSBHjIf4TqxObCeqpV5aOI5u1 Wm6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kSL0hgpy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si8275222ede.42.2020.05.12.13.05.30; Tue, 12 May 2020 13:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kSL0hgpy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731123AbgELUDE (ORCPT + 99 others); Tue, 12 May 2020 16:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731048AbgELUDD (ORCPT ); Tue, 12 May 2020 16:03:03 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4265C061A0C; Tue, 12 May 2020 13:03:03 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id 79so6334417iou.2; Tue, 12 May 2020 13:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=ydBNEcd5JjVpqJREhbFVwOQSjJgZ8/B8S4hq59DFYUI=; b=kSL0hgpyZvKFtG6jUkv2yJwaQ0HcSZvAVxkp3oRhg+j18nHvsY8MhoKdWbuZuITaV+ 0W3H5cOPXOZTxZnNdTJL4+A7P2+tXZfRbw0f0wh2nB2J4DdRoDu9vL4lZ3SeY5k6JZ+f 9XoVa9TLYBjWo8ZAIadjTr5tDuBZPQOjCZcV5j340VHpXc3lyvn9dQpZSAQiHriI+V6t B4yfgjaFTlzMu7pOanjZixh6A7oaFUzyj8OyEQctdk1woordxNGhBbUnbJOLaApkjJRb 2M+3WXJIJ3C7FFTMXiKUqxXuyAve90W5J2aC2e46iIq29rEGl5H0mTugbLBq6D4Qgpyx Ft/w== 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:reply-to :from:date:message-id:subject:to:cc; bh=ydBNEcd5JjVpqJREhbFVwOQSjJgZ8/B8S4hq59DFYUI=; b=ScXlARRTBUGIfVWSLBTHMjYBZ1XyXY+NnvBVCRv53FG0RF7vP0+UAz4odYja12wexj RPOBliO8JUUyO7g182VCLrO/yNw1tW20iaIPVJvCXSO84VLNDAxyh7HnNKai3DOCZdF7 yZe/V6KMPkeEN+YSphvfOIH7ncn4Ky/Yko29ZMKP4SZRPWUAcsa2DLk2fM8sm0CSGk8n SjYuY+kHiwgB0aNMT5+X0VY2sn8IwofDSNn8a/rNzMp11ASXVt6gJfHTn3rtaBYem9YM P/86ovY1A4wqmcQCY8vSVB4il5AnENEVz1/TH3Tht12BZn1idC6YPAbHLZeL/7Re5tn6 /SQg== X-Gm-Message-State: AGi0PuZQDekmCUHvqOZTfJZCX0kbdyry9Z7N6sSPqAEQT+sXgBf/l7iC G1zjqDifuMEtAtdfbB64YkKdiOR3ZrBUgNiFzeg= X-Received: by 2002:a05:6602:2dca:: with SMTP id l10mr11781247iow.163.1589313783081; Tue, 12 May 2020 13:03:03 -0700 (PDT) MIME-Version: 1.0 References: <20200504031340.7103-1-nick.desaulniers@gmail.com> <20200505004738.ew2lcp27c2n4jqia@google.com> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 12 May 2020 22:02:51 +0200 Message-ID: Subject: Re: [PATCH] Makefile: support compressed debug info To: Nick Desaulniers Cc: Masahiro Yamada , Fangrui Song , Nick Desaulniers , Michal Marek , Andrew Morton , Changbin Du , Randy Dunlap , Krzysztof Kozlowski , Linux Kbuild mailing list , Linux Kernel Mailing List , Clang-Built-Linux ML 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 12, 2020 at 9:23 PM Nick Desaulniers wrote: > > On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada wrote: > > > > > >On Mon, May 4, 2020 at 5:13 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. > > > >> > > 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 -