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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 C7EF6C433E6 for ; Mon, 18 Jan 2021 02:33:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A125D22525 for ; Mon, 18 Jan 2021 02:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730985AbhARCdV (ORCPT ); Sun, 17 Jan 2021 21:33:21 -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-Google-Smtp-Source: ABdhPJxghPKKFZfXRuqyf/ln2g2Vde9pBNxDQQMA4R+VxhCfUyDEYpwL6BrmysI20US1jRAcr454zHk78k+JbFhQuRg= 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