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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 5E811C433E6 for ; Fri, 29 Jan 2021 22:22:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C65864DE1 for ; Fri, 29 Jan 2021 22:22:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233369AbhA2WVs (ORCPT ); Fri, 29 Jan 2021 17:21:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232776AbhA2WVn (ORCPT ); Fri, 29 Jan 2021 17:21:43 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EDDAC061574 for ; Fri, 29 Jan 2021 14:21:03 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id s23so214167pjz.4 for ; Fri, 29 Jan 2021 14:21:03 -0800 (PST) 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=Waa2kugmLjDllXM/NpJiCr0cF57NhaJCQRM2OUEVOlc=; b=g6nU+Qb5P3f50N11vuxB+ZwYXdPvN6xlKaoTFHKCslL8CmcP2Qz71CuEpD2ZD3olRp AfcieM03kWk2D4DllGDsNX/54E3M7aM3HdYOLIw38Fcw3/HXsakid5CEKLK60YLQ9yiy znhoFLo3rp35FlJtqlC3FcpO1pseW+tCKTnPRF+Uvp9jp+V+1N7KWqAZhumVOH386Cug uIyrzKWnGAB4GuEqho+PcRBE49n1q0eUyPGzev019gmwKQWLz0Jxw+mOvheNLeYHgV/U pZC9kX+l5X0DUNxrjp3qiEHw3XXfZzwAFPDECHQLJa0YC153G31x2AINKT6gDeEcj9yv IFbw== 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=Waa2kugmLjDllXM/NpJiCr0cF57NhaJCQRM2OUEVOlc=; b=iI5IAwR/Z5fmobNpZ8OBYwcw3xXAnbM8IHBefVOiAxY7hO8OLQoqYJXHbnzfQ+iaHe 1GP4E327Zn6fPC5Ix4v2dyJxTGrutWbLplHEuL80+8sVXc6kQfIWlyndoA4Q/eBGMxE6 bDIWRrUyOrQJUxIpGUFZUNY30pQGNTJkRbxSxDpIoZ3BymJ740SaS9Qnf3OV9AD7pxN5 W7IvHZC3oWX9brHOaFajbC7sqTe5T5dxC/3y+VSsLc2+P/dMiZq9D7pnDYM3OGjqXI8G YasgTE38p4UtJ/Hue8/oD3331CRDsWlZQ1Epdzt7RiANIM5s0PZiIJYCVk4iNwkSrfL5 rkhQ== X-Gm-Message-State: AOAM533hiwdVpIthU9fQSaI3XIUkP/jf7vkRj5PbrBR7E7Azwml8sN9N Vm/e4hEuGmMnuMte1/YFQxQ4AgS/Hut63LqC/aSUdA== X-Google-Smtp-Source: ABdhPJw+BCsSOkR5G2eDjdV3LZUAtAJPNmMz7W9fVgUjrCLSfs7zMAkNu52xoeG49kO/2jRdwH3vSHUCFD4ovD2PtUs= X-Received: by 2002:a17:90a:8b82:: with SMTP id z2mr6434050pjn.25.1611958862659; Fri, 29 Jan 2021 14:21:02 -0800 (PST) MIME-Version: 1.0 References: <20210129194318.2125748-1-ndesaulniers@google.com> <20210129194318.2125748-3-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 29 Jan 2021 14:20:51 -0800 Message-ID: Subject: Re: [PATCH v6 2/2] Kbuild: implement support for DWARF v5 To: Sedat Dilek Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , LKML , Clang-Built-Linux ML , Linux Kbuild mailing list , linux-arch , Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Arvind Sankar 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 2:11 PM Sedat Dilek wrote: > > On Fri, Jan 29, 2021 at 11:09 PM Nick Desaulniers > wrote: > > > > On Fri, Jan 29, 2021 at 1:20 PM Sedat Dilek wrote: > > > > > > On Fri, Jan 29, 2021 at 10:13 PM Sedat Dilek wrote: > > > > > > > > On Fri, Jan 29, 2021 at 10:09 PM Nick Desaulniers > > > > wrote: > > > > > > > > > > On Fri, Jan 29, 2021 at 12:55 PM Sedat Dilek wrote: > > > > > > > > > > > > On Fri, Jan 29, 2021 at 9:48 PM Nick Desaulniers > > > > > > wrote: > > > > > > > > > > > > > > On Fri, Jan 29, 2021 at 12:41 PM Sedat Dilek wrote: > > > > > > > > > > > > > > > > On Fri, Jan 29, 2021 at 8:43 PM Nick Desaulniers > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > diff --git a/Makefile b/Makefile > > > > > > > > > index 20141cd9319e..bed8b3b180b8 100644 > > > > > > > > > --- a/Makefile > > > > > > > > > +++ b/Makefile > > > > > > > > > @@ -832,8 +832,20 @@ endif > > > > > > > > > > > > > > > > > > dwarf-version-$(CONFIG_DEBUG_INFO_DWARF2) := 2 > > > > > > > > > dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4 > > > > > > > > > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5 > > > > > > > > > DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y) > > > > > > > > > > > > > > > > > > +# If using clang without the integrated assembler, we need to explicitly tell > > > > > > > > > +# GAS that we will be feeding it DWARF v5 assembler directives. Kconfig should > > > > > > > > > +# detect whether the version of GAS supports DWARF v5. > > > > > > > > > +ifdef CONFIG_CC_IS_CLANG > > > > > > > > > +ifneq ($(LLVM_IAS),1) > > > > > > > > > +ifeq ($(dwarf-version-y),5) > > > > > > > > > +DEBUG_CFLAGS += -Wa,-gdwarf-5 > > > > > > > > > > > > > > > > I noticed double "-g -gdwarf-5 -g -gdwarf-5" (a different issue) and > > > > > > > > that's why I looked again into the top-level Makefile. > > > > > > > > > > > > > > That's...unexpected. I don't see where that could be coming from. > > > > > > > Can you tell me please what is the precise command line invocation of > > > > > > > make and which source file you observed this on so that I can > > > > > > > reproduce? > > > > > > > > > > > > > > > > > > > That's everywhere... > > > > > > > > > > > > $ zstdgrep --color '\-g -gdwarf-5 -g -gdwarf-5' > > > > > > build-log_5.11.0-rc5-8-amd64-clang12-lto.txt.zst > > > > > > | wc -l > > > > > > 29529 > > > > > > > > > > I'm not able to reproduce. > > > > > > > > > > $ make LLVM=1 -j72 V=1 2>&1 | grep dwarf > > > > > ... > > > > > clang ... -g -gdwarf-5 -Wa,-gdwarf-5 ... > > > > > ... > > > > > > > > > > $ make LLVM=1 LLVM_IAS=1 -j72 V=1 2>&1 | grep dwarf > > > > > ... > > > > > clang ... -g -gdwarf-5 ... > > > > > ... > > > > > > > > > > > > > Hmm... > > > > > > > > I do not see in my current build "-Wa,-gdwarf-5" is passed with v6. > > > > > > > > $ grep '\-Wa,-gdwarf-5' build-log_5.11.0-rc5-10-amd64-clang12-lto-pgo.txt > > > > [ empty ] > > > > > > > > > > That's the diff v5 -> v6... > > > > > > There is no more a dwarf-aflag / KBUILD_AFLAGS += $(dwarf-aflag) used. > > > > Yep; not sure that's relevant though to duplicate flags? > > > > > > > Can you tell me please what is the precise command line invocation of > > > > > make and which source file you observed this on so that I can > > > > > reproduce? > > > > If you don't send me your invocation of `make`, I cannot help you. > > > > /usr/bin/perf_5.10 stat make V=1 -j4 LLVM=1 LLVM_IAS=1 > PAHOLE=/opt/pahole/bin/pahole LOCALVERSION=-10-amd64-clang12 > -lto-pgo KBUILD_VERBOSE=1 KBUILD_BUILD_HOST=iniza > KBUILD_BUILD_USER=sedat.dilek@gmail.com > KBUILD_BUILD_TIMESTAMP=2021-01-29 bindeb-pkg > KDEB_PKGVERSION=5.11.0~rc5-10~bullseye+dileks1 $ make LLVM=1 LLVM_IAS=1 -j72 defconfig $ make LLVM=1 LLVM_IAS=1 -j72 menuconfig $ make LLVM=1 LLVM_IAS=1 -j72 V=1 &> log.txt $ grep '\-g -gdwarf-5 -g -gdwarf-5' log.txt | wc -l 0 $ grep '\-g -gdwarf-5' log.txt | wc -l 2517 Do have the patch applied twice, perhaps? Is your compiler haunted, or is mine? (haha! they both are; false dichotomy; they are one in the same). Is zstdgrep haunted, or is GNU grep haunted? :P -- Thanks, ~Nick Desaulniers