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,URIBL_BLOCKED,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 60E7EC433DB for ; Mon, 18 Jan 2021 21:57:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E77F22DFB for ; Mon, 18 Jan 2021 21:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732895AbhARV5e (ORCPT ); Mon, 18 Jan 2021 16:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732607AbhARV5d (ORCPT ); Mon, 18 Jan 2021 16:57:33 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0092C0613D3 for ; Mon, 18 Jan 2021 13:56:52 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id rv9so6931635ejb.13 for ; Mon, 18 Jan 2021 13:56:52 -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=oatfa8Uxac5y+QfNKWVhpzcqRMF9g7xn6+1Ypo2kSWs=; b=G9OuzfiKkq0Itr91GvGyb6IuOc32itpL5+ewRZfC6Nb2iA8ft7wxwZztrsWj0HGIjk 9r44dpP8GQLoJIjc8ckScnATpIyG7Wwo0NyNO5dIowX0yhfAYwZ5aBRAmJzFxL/q6ffT gyhbSu21s3NRgcIaIrnY/Zbojeb4tttsPVADFPyGqmjCnm2Zlzk/9OhMaaYlmlh55+vj uQXshD/S9jx+efobBEnmEAg0k8+Vc9MQ5P39JR1EY9ERQ4joWJJwgSVlKgWCtiHkVRKX LOyD71QPCsUTDBwIBHdndIrPlZ7pNEmOHt+W/DqMxvehJHCvOw6HQnoTzIhXmUa/Uxa2 QRlQ== 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=oatfa8Uxac5y+QfNKWVhpzcqRMF9g7xn6+1Ypo2kSWs=; b=LHY/eXFtJX7SPeveO7hEgMTDdsZPW35o1XB8Cvtvl/JmcpZMxeORymPf2Yeqj0PDej 8woXMdKuEiW5KX/nOmTLFTfLigSVhjB6siZXGKVvjfRnpQLZ9J6tgye2FIDJkRiTXrcE AROwf1Zvvh6XU3hEqvCb59xNUVVwpxYIIFJYj+KqOEEe9KFzL4ezfUnLQAApNYNvLdG2 oNjA0cRup0FP9o0HO0eOJntCVSuEFOjn3LWEe1a3diOwKC3ElTmeyOAzpV7mk1h0GEjt g3r+k9kXMo7J/LBaEloDIpU/f6nRtwdUnhW/1ExNZmcao98j3J4WCslrherbVKMKGBcS D6eQ== X-Gm-Message-State: AOAM533XZim5jWOfjTXll125tZ91pnOk5663P33oudWv86aJBdDNmTOT 2x3dEdXUCKu/l7oMu7FR0jV2CrbA8UsXnf75Y0CS X-Google-Smtp-Source: ABdhPJwiTaEsKdexNKIoHB/eUfZQnzukIdscZm/if80Y4LpzPxBkFga14LG96UqrRR257lycf5KwAWK9fvWQ62ucVAY= X-Received: by 2002:a17:907:e9e:: with SMTP id ho30mr1073618ejc.529.1611007011377; Mon, 18 Jan 2021 13:56:51 -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: Mon, 18 Jan 2021 13:56:39 -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-doc@vger.kernel.org On Mon, Jan 18, 2021 at 9:26 AM Sedat Dilek wrote: > > On Mon, Jan 18, 2021 at 1:39 PM Sedat Dilek wrote: > > > > On Mon, Jan 18, 2021 at 3:32 AM Bill Wendling wrote: > > > > > > 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. > > > > > > > Reproducible. > > > > LLVM_IAS=1 + DWARF5 = Not bootable > > > > I will try: > > > > LLVM_IAS=1 + DWARF4 > > > > I was not able to boot into such a built Linux-kernel. > PGO will have no effect on debugging data. If this is an issue with DWARF, then it's likely orthogonal to the PGO patch. > For me worked: DWARF2 and LLVM_IAS=1 *not* set. > > Of course, this could be an issue with my system's LLVM/Clang. > > Debian clang version > 12.0.0-++20210115111113+45ef053bd709-1~exp1~20210115101809.3724 > Please use the official clang 11.0.1 release (https://releases.llvm.org/download.html), modifying the kernel/pgo/Kconfig as I suggested above. The reason we specify clang 12 for the minimal version is because of an issue that was recently fixed. > Can you give me a LLVM commit-id where you had success with LLVM_IAS=1 > and especially CONFIG_DEBUG_INFO_DWARF5=y? > Success means I was able to boot in QEMU and/or bare metal. > The DWARF5 patch isn't in yet, so I don't want to rely upon it too much. -bw