Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2962441ybk; Tue, 12 May 2020 12:25:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFhCd5SNX3dvxhtVJtqMR8ub8sQx19NggjiF0XKmDNfkhutVJb+BC0zPU2HDYmndXEedH2 X-Received: by 2002:a17:906:81ce:: with SMTP id e14mr7356375ejx.76.1589311543568; Tue, 12 May 2020 12:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589311543; cv=none; d=google.com; s=arc-20160816; b=Wcqe3lKvlHwFxUEWEUDQjCZYJLrbgv+JPNR3veo5do5RCcIq7M7LEh8Lj9HpuKB4N/ kJU7eorxpmvF6s6GT5yzWW/EJ0YsO214LaaKE2wy2+HTMdQcHJIZ7EePXT45gslJDV1b J8IGozkv7lmhhQQQVZ4YjdNr1qSPxCua7+2y7MU9iWMbL2CPL9tybge2YSBopFySTzHR 5jt7gfD45zPu0l9EPhp252O2XvukgGs/oZkEtySnDlw7OCxxdxPRBUDeb6EqCAI8rh0b B0qmXf7Sj/c35p8UJ2uJ8aeipof7BXFLVwcdz4m/VhQKskiSX1j1DClLoeEaiWRrs4Cl MNow== 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 :in-reply-to:references:mime-version:dkim-signature; bh=X3Opb6arzJwXelkGLAeI5ijV0q+qANDWY75OUMFqdTw=; b=WrbZS8iTRAHUeheY47RMzDOXkRsUlR8uRO3SaWZa0W1q4FqJJps/tm/Cj2OIu3VoxX 2lU1yQeHetUBqijrOpdso2Fjbl3bAho9nZYOjjmTBiLg2DPO6aZ3v61Ly0oAfY+LiQru WD8hJ7y4PoUoxfWECtdpTn++bWCxWOIoYT6aRD8/c14bDp60UxZDYzWilwBTYmW6290Y R2zN68l2weR4Edx1Up/eJ9bI7qpG4dmZu77ALX5JXP8c28hT0i94nvo1y+e48ZA/QzsQ JTDYvIS21irenISQ7s2kAvUol3cqQ8v9YyF4dj+t68ZqJja+tHZ2ffejVn9EUgPnDOmm aRSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=uGqh2RXU; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si8356362edt.595.2020.05.12.12.25.20; Tue, 12 May 2020 12:25:43 -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=@google.com header.s=20161025 header.b=uGqh2RXU; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730711AbgELTXr (ORCPT + 99 others); Tue, 12 May 2020 15:23:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbgELTXq (ORCPT ); Tue, 12 May 2020 15:23:46 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF1BCC061A0C for ; Tue, 12 May 2020 12:23:46 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id m7so5810046plt.5 for ; Tue, 12 May 2020 12:23:46 -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=X3Opb6arzJwXelkGLAeI5ijV0q+qANDWY75OUMFqdTw=; b=uGqh2RXUdJGWl4vM5ngSkKyM33oCzN0D7rcTg3PahkCN5jK46nLHvb81Q6+NXnvJk6 LjUqly3uQEVD7t/d9EUt+Z7iaEkHN+WWMlSTXWjuF7T5NO3Vib4I2JIS89lpqrhIOx1v sZ6h90wKOXIzfl49sNYheDJhejgkqD8GVao4Tj6ExSkA2DfXUIG14pvJ6cAjN5BRDiio ZTAS0jFvVdqjYdf2KJ47sIn7LpAQjmJZPfqEEVRzg8PoSIetgsVuPk7fcaaMtmB6wh8e HkN3ZzjHFrxeqBOVBc6mAB+pYXi9ZRBkJOaVDiWPHcKMwsPmAd6w8WRR/XXnvj+r2zqs HRRA== 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=X3Opb6arzJwXelkGLAeI5ijV0q+qANDWY75OUMFqdTw=; b=f8zbL1+uEzCq/tuBRDe2lHEURc8csifs1BPGK06f7AtfiVtKDimdEsHPAJB+9GYDIU S2DJH5x7/8sLvaBBB9z2NF0QyfKWEr8mCDly4cwtOP+gYI5QwgvjQb4h1vDSwPGGLYwM Z1QxMEuAimDk8ULLSOZY8XWQSY14mdBYGeERzXwjbdMDzB5YhIKthqJiNzPJGNtHbQk5 LGbNkhWM8oEIqBEZX4Ri7rQFAw+vefpKNUrOyX3s6m6XGQXD0hDeASVSSb+qHn1yyMMC emuoxuAIF/LUrWyR/oiB30yg5adOrfoc99KCM2s+au8fJBErQMYvB3KV7Dbx6m8NKHfZ 0Eyw== X-Gm-Message-State: AOAM5333JehGYT+fWeVsFNHYyjPcjTJX5G4xBpcv3QLu5gwTsFbalV78 8nEKEABD0TNVMeRw5br2LErTaDGEuehcjw1gf6vkJA== X-Received: by 2002:a17:90a:2a4a:: with SMTP id d10mr4799210pjg.32.1589311426080; Tue, 12 May 2020 12:23:46 -0700 (PDT) MIME-Version: 1.0 References: <20200504031340.7103-1-nick.desaulniers@gmail.com> <20200505004738.ew2lcp27c2n4jqia@google.com> In-Reply-To: From: Nick Desaulniers Date: Tue, 12 May 2020 12:23:34 -0700 Message-ID: Subject: Re: [PATCH] Makefile: support compressed debug info To: Masahiro Yamada , Fangrui Song , Sedat Dilek Cc: 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 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. 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