Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2192074pxb; Fri, 29 Jan 2021 16:15:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOkd8ZweX5OB6c7+1VwOn4sjcTNrLYr7m7OcWjawLEjokQfx5v6FQHGZvp8sK/ATErKowj X-Received: by 2002:a17:906:3b11:: with SMTP id g17mr6822114ejf.473.1611965719919; Fri, 29 Jan 2021 16:15:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611965719; cv=none; d=google.com; s=arc-20160816; b=ebhL96mzotdhm9rEsum8gvP8pSYeIUM5UCYtYNOVb7i1OwwwR2aCBWn6HT/y9WtTuo QpXOfqHP5bcyEqhttAaM00FfkS2g4P0RiLXKU9Eo3pWcKfkhFvm9v3FpJs1Aa9gLIcMf BaTeFyTFUHOZ09OSXvAIUnwO+iO7Q8M0DRGMSdoj9ltcOJbKIDYkowFHswRLkIk/7c1/ Hm78Le+aZycgE0+hd5muXE/tVYqG7/8Aylazg5O3IxuzY9mUjGNu4jOU2IcdWksZ+LDQ xlZ1Ihr7AGEyw/VqTi43sYNi/6VRhFHeHfEbVUNKL/p2TtB7gY+93f62tKL1p8kpQvsL MJTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=VZDd1asC8dvFh6n2YN5mdYVp43kT9MvVXFzgygn8cX8=; b=A3xtEG4nMiJvaeAQ9InzBotgncvqHjNA1LZjc23P4nfddfFAkhxPu7Y9ZEpWoMfxzD Zo3uzgKbrhru5+r7MkoctXzac6zk67p0r3711THB2s1m2biC4Bc0ix8+YlPpaIrrUW8a dMAbek2zw8Tw41PC+DlhhR6dt8Oz4rY++bGLVKLuzdCKDuWUrAzXcKCSwy90XvRBhTza cxwSSD7YyMH+5E0jvGsw+slhKBzYhLcsap26tddNPS+0WfdN5+mf9j188N5EG+WYnz2O ecnZURny/YJSUBKypyXHjAEut+5Ckahb9MUfrSfBVTa77tq2T4sMgP7rlHc2mRDISrKh JtwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dUVUO05O; 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 bt10si6162310edb.316.2021.01.29.16.14.54; Fri, 29 Jan 2021 16:15:19 -0800 (PST) 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=dUVUO05O; 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 S231489AbhA3AJB (ORCPT + 99 others); Fri, 29 Jan 2021 19:09:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbhA3AJA (ORCPT ); Fri, 29 Jan 2021 19:09:00 -0500 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 014D5C061573; Fri, 29 Jan 2021 16:08:20 -0800 (PST) Received: by mail-il1-x131.google.com with SMTP id l4so10101745ilo.11; Fri, 29 Jan 2021 16:08:19 -0800 (PST) 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=VZDd1asC8dvFh6n2YN5mdYVp43kT9MvVXFzgygn8cX8=; b=dUVUO05OD7GnA8IZvMwytebwJWb5RZ0FvAWUmMhd4Nd+dpmOfCHC4XZNghhCVRkTV8 YsunGNP6E5+uGHmU9HkrqE9q+/U3hWKkhsn5pFo9lzESIgwH0XJh8vfNhFif8y7iCJjO 52k5MoZOeUZjt51rPDefwH31Syie5RNVOWVo9O9tM4WLJ/7/m6t8gRMXPZ6IuLihz51d l4F+bokymp5gVbzSrW6MXqFZRnfeQ3o1svrFooq9NKWdQtiXFD3cKIJB4S/n/eYr7o+K sBeBBHD7d2uOuxs0Hlz22BJlFfLSf4qfssNTeGyWoNsbuVBHB8KVHn9lJTDIDN3H4IFj GWgw== 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=VZDd1asC8dvFh6n2YN5mdYVp43kT9MvVXFzgygn8cX8=; b=sun0kE5Y1yZ6lwxw/oLFY6EVOii7rvF6Lmif2UUpy4NffWQrj7iGJxoIcF7eg5vsuu l0EC65ZcUtbbwlJqe5MZqBVoGttRKNizsv0Y+rM9mJ+8WPbkw+J6Co9eJpGUK3nQuSfz jAkZdosw6CiHvMr/vvbn5uqTx33Ay1mx253pRMvCqkH1Uh/PsdnuV28d/CJx5j60fkad IeiDjxrZPBvL8/kSlvRvroanVTGjmZ553/p4PSi4q01I5x+YTyTetivdke1K7ImRwdjg Jt6Z1qPnLHnHN8P72pvPiDQQ6+h/XgjG01kVsErLhIWXPppGIs5wVJdTfekbSXPK1Gnn YpCw== X-Gm-Message-State: AOAM531C55eocfP93M372BIsTjHX0YxeHwVKj+Zyt27VWSGDc4hOEpRF 0kyqLIjYHmYOV6EoV3NjlzuqiKTN119UlZQorUw= X-Received: by 2002:a05:6e02:d0:: with SMTP id r16mr4981903ilq.112.1611965299380; Fri, 29 Jan 2021 16:08:19 -0800 (PST) MIME-Version: 1.0 References: <20210129194318.2125748-1-ndesaulniers@google.com> In-Reply-To: <20210129194318.2125748-1-ndesaulniers@google.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Sat, 30 Jan 2021 01:08:06 +0100 Message-ID: Subject: Re: [PATCH v6 0/2] Kbuild: DWARF v5 support To: Nick Desaulniers Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , linux-kernel@vger.kernel.org, Clang-Built-Linux ML , linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 8:43 PM Nick Desaulniers wrote: > > DWARF v5 is the latest standard of the DWARF debug info format. > > DWARF5 wins significantly in terms of size and especially so when mixed > with compression (CONFIG_DEBUG_INFO_COMPRESSED). > > Link: http://www.dwarfstd.org/doc/DWARF5.pdf > > Patch 1 is a cleanup that lays the ground work and isn't DWARF > v5 specific. > Patch 2 implements Kconfig and Kbuild support for DWARFv5. > When you will do a v7... Can you look also at places where we have hardcoded DWARF-2 handling... For example: arch/x86/purgatory/Makefile:AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2 arch/x86/purgatory/Makefile:AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2 - Sedat - > Changes from v5: > * Drop previous patch 1, it has been accepted into kbuild: > https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=kbuild&id=3f4d8ce271c7082be75bacbcbd2048aa78ce2b44 > * Trying to set -Wa,-gdwarf-4 in the earlier patch was the source of > additional complexity. Drop it that part of the patch. We can revisit > clang without the integrated assembler setting -Wa,-gdwarf-4 later. > That is a separate problem from generally supporting DWARF v5. > * Rework the final patch for clang without the integrated assembler. > -Wa,-gdwarf-5 is required for DWARF5 in that case otherwise GAS will > not accept the assembler directives clang produces from C code when > generating asm. > > Changes from v4: > * drop set -e from script as per Nathan. > * add dependency on !CONFIG_DEBUG_INFO_BTF for DWARF v5 as per Sedat. > * Move LLVM_IAS=1 complexity from patch 2 to patch 3 as per Arvind and > Masahiro. Sorry it took me a few tries to understand the point (I > might still not), but it looks much cleaner this way. Sorry Nathan, I > did not carry forward your previous reviews as a result, but I would > appreciate if you could look again. > * Add Nathan's reviewed by tag to patch 1. > * Reword commit message for patch 3 to mention LLVM_IAS=1 and -gdwarf-5 > binutils addition later, and BTF issue. > * I still happen to see a pahole related error spew for the combination > of: > * LLVM=1 > * LLVM_IAS=1 > * CONFIG_DEBUG_INFO_DWARF4 > * CONFIG_DEBUG_INFO_BTF > Though they're non-fatal to the build. I'm not sure yet why removing > any one of the above prevents the warning spew. Maybe we'll need a v6. > > Changes from v3: > > Changes as per Arvind: > * only add -Wa,-gdwarf-5 for (LLVM=1|CC=clang)+LLVM_IAS=0 builds. > * add -gdwarf-5 to Kconfig shell script. > * only run Kconfig shell script for Clang. > > Apologies to Sedat and Nathan; I appreciate previous testing/review, but > I did no carry forward your Tested-by and Reviewed-by tags, as the > patches have changed too much IMO. > > Changes from v2: > * Drop two of the earlier patches that have been accepted already. > * Add measurements with GCC 10.2 to commit message. > * Update help text as per Arvind with help from Caroline. > * Improve case/wording between DWARF Versions as per Masahiro. > > Changes from the RFC: > * split patch in 3 patch series, include Fangrui's patch, too. > * prefer `DWARF vX` format, as per Fangrui. > * use spaces between assignment in Makefile as per Masahiro. > * simplify setting dwarf-version-y as per Masahiro. > * indent `prompt` in Kconfig change as per Masahiro. > * remove explicit default in Kconfig as per Masahiro. > * add comments to test_dwarf5_support.sh. > * change echo in test_dwarf5_support.sh as per Masahiro. > * remove -u from test_dwarf5_support.sh as per Masahiro. > * add a -gdwarf-5 cc-option check to Kconfig as per Jakub. > > Nick Desaulniers (2): > Kbuild: make DWARF version a choice > Kbuild: implement support for DWARF v5 > > Makefile | 16 ++++++++++-- > include/asm-generic/vmlinux.lds.h | 6 ++++- > lib/Kconfig.debug | 41 ++++++++++++++++++++++++++----- > scripts/test_dwarf5_support.sh | 8 ++++++ > 4 files changed, 62 insertions(+), 9 deletions(-) > create mode 100755 scripts/test_dwarf5_support.sh > > -- > 2.30.0.365.g02bc693789-goog >