Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1740269pxb; Sun, 17 Jan 2021 21:08:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwN0USDkjVtJuJqBeDin7CmUw3UxFYXseur2kvkFf+hKWIGWkSKG3MCXhQhNangMikeIjQz X-Received: by 2002:a05:6402:1714:: with SMTP id y20mr17374115edu.360.1610946539454; Sun, 17 Jan 2021 21:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610946539; cv=none; d=google.com; s=arc-20160816; b=pDFWvMkgyk9UtHyrMhW2tkG2119kDVQQKRb41KeMz3FlcKDzHYC0gTANQDuLJLlq6+ aszo5lLCg43SX0up3ajkDj0UruNPyAoi+5WFW3gRitO7XwB6bLuiwQl9WEpbDnheQ4IX QMz+bIUnHgQmnLf0T9qqmOiNJHxI9AU7Kd85dCtHo2XYAAGGWrQgj4EqVEZRCsWziSTw i3xRMsW/F0Qp6eekiqpQAOE0OzuH2KjnRwRUx04HKULpnRhyD1sjJL15RuEnoCgW2qqY KGTpsZszMO8uTPAWPwsplzQrliZUiaCvV8vyjx/gpMssNmb5wG/dPZR/kPTGrAcRO5za 9M5w== 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:in-reply-to :references:mime-version:dkim-signature; bh=iw3qguMN2HQw0dg4Ex4c2c9WaYKPlQtajPSFcrfomWk=; b=kIQ9wfw8dIsnlGFRgyCv5a9gjfhjzAOmRU1dxjrbFSaWg8jbOWOBtPY6I9KiIKS0nX 8gg0b+mHi8rDGU+1G8AuCw7S03aWXUgs5XQr10AkJpqL8nk1LICsxCjqFF1FS9W9rKfy emjrBM7ImQmYHE68fITP39yNUyqucR4fvvXa28acHb3MDhi3GpxcCQownRwhz3JCcban fAxaVmq1EaZGYJaKQlzfJXdae+T8Ygxk/KgHcdqjGFR33I6/n7rTlhLA6EGdj0m+54ZG so467+TOiV+bZertMhPN2YUfsXTqA22GgPxXIzPkP97mPlbK+V0FnMJcYsvaPiBtMUim LcxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fu01MN1R; 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 ho19si1720945ejc.674.2021.01.17.21.08.27; Sun, 17 Jan 2021 21:08:59 -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=@google.com header.s=20161025 header.b=fu01MN1R; 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 S1730927AbhARCdU (ORCPT + 99 others); Sun, 17 Jan 2021 21:33:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730897AbhARCdS (ORCPT ); Sun, 17 Jan 2021 21:33:18 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 203B2C061575 for ; Sun, 17 Jan 2021 18:32:38 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id u19so15893303edx.2 for ; Sun, 17 Jan 2021 18:32:37 -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=iw3qguMN2HQw0dg4Ex4c2c9WaYKPlQtajPSFcrfomWk=; b=fu01MN1RBBEK4GjqxdZtdRWsxoe0l9gdxKc7VAXhfUw+tqXVYw6Oq+GVUbZqZioYee N9PAsxghkj2YFg/oY2Kfd/aPAMevD0MMkPFwZVCRANgHNcOdnY9IYshUJI2yRtFJ64hW Gkza/6nurwrZt6HTmS4djj7qoivCSpusIfO5NOPpDqePuVN+rSCRwwJ9ohen352cj+bR LTuMgBLYNGITa5YwWJarpdUlAoXhDOrb8/ZjE5lwtaUmUPsdgglKrX+aendAxoUyz1L5 uBmgzrjKmHlNFy/MSMTacEjHvNPV+Ajgz13VDTg1/a5kATrlpS3NpWIivAhwrRC9XCY5 e4ew== 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=iw3qguMN2HQw0dg4Ex4c2c9WaYKPlQtajPSFcrfomWk=; b=ZpRRAdIGf+vhbRd7YJL2IqS7uH51731vLD18JwN+gbMgaye7kFetrZo1Jyj53HMF7C 9INgqXt/EYV/0BIlGf1cK8Ta/A/wu96qFHOex+1bs4DhZndQlN7A5MRgToDohpwbDqVs XGdJBQZhXKSDl6eqvqj8Dj4Npik3anM70qXcwwF6mXTIuwXHsvFqmkJCb2P7v1zlJ6u/ OcoR9saERxlebR7LOPv7tD/CMkj5ebMK+K8f5QPRYtKO0d1AICKGTMK0INjz/HmH/EQe 0smbIaOQ+6Jqvex/Tw0J1bOOMEZDVci6B46ojT9tC9GY7uj/uU9bi5+5RD+pJbjFX3yM A/hA== X-Gm-Message-State: AOAM5317j5k6f0K/DVR4RiXq+fgf1sjkd3HVa+mrg8MPaLrg2tcMe1MB 4fFgRGN29fUQusdKwEqj/Niytm5Bz4lkXi2V1DkH X-Received: by 2002:aa7:c719:: with SMTP id i25mr13208470edq.197.1610937156426; Sun, 17 Jan 2021 18:32:36 -0800 (PST) MIME-Version: 1.0 References: <20210113061958.886723-1-morbo@google.com> <20210116094357.3620352-1-morbo@google.com> In-Reply-To: From: Bill Wendling Date: Sun, 17 Jan 2021 18:32:25 -0800 Message-ID: Subject: Re: [PATCH v5] pgo: add clang's Profile Guided Optimization infrastructure To: Sedat Dilek Cc: Jonathan Corbet , Masahiro Yamada , Linux Doc Mailing List , LKML , Linux Kbuild mailing list , Clang-Built-Linux ML , Andrew Morton , Nathan Chancellor , Nick Desaulniers , Sami Tolvanen , Fangrui Song Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 17, 2021 at 4:27 PM Sedat Dilek wrote: > > [ big snip ] [More snippage.] > [ CC Fangrui ] > > With the attached... > > [PATCH v3] module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for > undefined symbols > > ...I was finally able to boot into a rebuild PGO-optimized Linux-kernel. > For details see ClangBuiltLinux issue #1250 "Unknown symbol > _GLOBAL_OFFSET_TABLE_ loading kernel modules". > Thanks for confirming that this works with the above patch. > @ Bill Nick Sami Nathan > > 1, Can you say something of the impact passing "LLVM_IAS=1" to make? The integrated assembler and this option are more-or-less orthogonal to each other. One can still use the GNU assembler with PGO. If you're having an issue, it may be related to ClangBuiltLinux issue #1250. > 2. Can you please try Nick's DWARF v5 support patchset v5 and > CONFIG_DEBUG_INFO_DWARF5=y (see attachments)? > I know Nick did several tests with PGO. He may have looked into it already, but we can check. > I would like to know what the impact of the Clang's Integrated > Assembler and DWARF v5 are. > > I dropped both means... > > 1. Do not pass "LLVM_IAS=1" to make. > 2. Use default DWARF v2 (with Nick's patchset: CONFIG_DEBUG_INFO_DWARF2=y). > > ...for a successfull build and boot on bare metal. > [Next message] > On each rebuild I need to pass to make ...? > > LLVM=1 -fprofile-use=vmlinux.profdata > Yes. > Did you try together with passing LLVM_IAS=1 to make? One of my tests was with the integrated assembler enabled. Are you finding issues with it? The problem with using top-of-tree clang is that it's not necessarily stable. You could try using the clang 11.x release (changing the "CLANG_VERSION >= 120000" in kernel/pgo/Kconfig/ to "CLANG_VERSION >= 110000"). -bw