Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2488645pxb; Mon, 18 Jan 2021 20:57:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJweGtDVLTgM775rUJ+12uqV5Bq6J/hHMCIG/+LaF7pqYc7iWQED211ZOtcGM32d+O8E0JRy X-Received: by 2002:a17:906:8057:: with SMTP id x23mr1877601ejw.179.1611032258884; Mon, 18 Jan 2021 20:57:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611032258; cv=none; d=google.com; s=arc-20160816; b=lJV3ZXOshDAeAC7VURLo2rndNz40w+yxGTeN46DeBXDM2v9TnkwDgRTv4tVrk+MF8z Zf3w4avQZHtQIG5KmpC/c4kEIldph3jFWujQj4jwZdAZEFjhH1QxixRQz7mOmXwNPtyW 1FYpjgrKiv/Qp1NBD/fPC5t3khBq4B8qW6C8M1jGzlDuSiHtp93WzsXEKfHzTLaO7CI5 9DVD+lu+pWJhurUcDY61JRVeGvGHneYLYwaZhgWLWYpz7POCnweIRWNvaJQvdOhKDltW Lqs/mHm7a7kNyi6hZPEKY4xPjMNp5mP5+eiuYKri34W+fBTjgL0qhOKQjmw0CoVNj0sB zVhQ== 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=/PCeIqOYxF8DBChe/FqeIpuGpAycN06Z+LtSWgqflkc=; b=tkD6E+YGHVBqCrgVPubFJ3XENqKv7Amv19YOurTmsR/CQg2pNggE/NAFW0foWetm1l tLACmLy896l/aliPtMVbEJlKnJvH1MfEQ1vXk+oaptKwKQZcNRgyOtJLCslXjahQZyLM Iuzh9HRN9rBfA+EQL43f30/DrmChgzOpr67viu5aypP5LppOgoZOwf8Mwni9rCmTYbz3 ojPIsAC8iMpfhHbO5Xz0J2zDOWoqvs6iMdhbnvFEkPNp5fuGFf5xC66PtBQxU7/QtpoG phL6ZNl2LvQMfaREYXx4s5c9cRXg8Rxs4uYT4RvadPitwHDEtlwBEvtNy3Dmd/Z5QGtB qYiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j9j46G0X; 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 t1si7333564ejc.524.2021.01.18.20.57.16; Mon, 18 Jan 2021 20:57:38 -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=j9j46G0X; 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 S2436563AbhARRe7 (ORCPT + 99 others); Mon, 18 Jan 2021 12:34:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393711AbhARR1M (ORCPT ); Mon, 18 Jan 2021 12:27:12 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90921C061757; Mon, 18 Jan 2021 09:26:31 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id e22so10526767iog.6; Mon, 18 Jan 2021 09:26:31 -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=/PCeIqOYxF8DBChe/FqeIpuGpAycN06Z+LtSWgqflkc=; b=j9j46G0XZfqSofwk4Dsv+ueKyn3hfButfT4eS5RoqR9b8au7bOzQV/fIvkp+6ghhRW 9csqyLm9Wo4MEsUVV751MX+8ijKvaQ5Y0L2dxSC8DdUQNYAfScH7ZXYbTMFOC26Ws747 /e/gOQeVXrDREYchVzBB8Ol2FbWZ6HMHZruoHa1bgY8f3tO+XBKzm95aRLFE8/x14TGb WG5xYfNbflssucQEaSQZmctBfC3dIEcS5q/+70XuxE//n2OqfYkg2QQM8xAO1I2lQq/t nEgxhxXaPZ5JhFZJvex4c3W4FpgBgy8+hAbY6x80Qmmc1QT0bvQAor6rQMzufRMct+9M vQ5A== 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=/PCeIqOYxF8DBChe/FqeIpuGpAycN06Z+LtSWgqflkc=; b=swK7JBWJU9qO9UYIiQvZkXAaYwjN7/ERebzjY/ih53oRz82uFmj4E4qMiogxysGEFN ppe5pptBiZ1s6dcBrToqvgTVYYA62Rhatw7ASixVulhd5VBJMXQS4kNAkGufkZb4m3Cg 82huZq+yltBduM/hDvph7zXuU/xk5JWX9pDdbOY2ygwukgQnj7a77JCrrZm7XaTCDf4D 8vuzssRnIgIiY2W58TpjxPIZlmrunY9a7b4Y5pS0nBQq7HOySmrDfRH3SxieJdwyWilJ a9KLfUb8lwGs71OOwFZuW+MiDj6RP3OtRPkk3hLSzH9PyGl3P19JhuwhsKaZjWgkrLIM VGDg== X-Gm-Message-State: AOAM532WspZLY5MlvVtyinx/U4vurOMX2a+3hWG3yVQ2VgOMUIUnR+gu KDMtXUel6YnQwlPJ7tb0GJQVKoghQpNS0GIXAOM= X-Received: by 2002:a92:d990:: with SMTP id r16mr290889iln.10.1610990790846; Mon, 18 Jan 2021 09:26:30 -0800 (PST) MIME-Version: 1.0 References: <20210113061958.886723-1-morbo@google.com> <20210116094357.3620352-1-morbo@google.com> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Mon, 18 Jan 2021 18:26:19 +0100 Message-ID: Subject: Re: [PATCH v5] pgo: add clang's Profile Guided Optimization infrastructure To: Bill Wendling 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 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. 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 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. Thanks. Regards, - Sedat - > > > > 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