Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2298590pxb; Mon, 18 Jan 2021 13:59:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzk5YACSSZypG/9uo0YMYRWSHG+p8Kl4+dl+m/RXbUwYHyRJnIyPqttBqBV5rSJ5Gjb8G7U X-Received: by 2002:a50:f0dc:: with SMTP id a28mr1091565edm.291.1611007174630; Mon, 18 Jan 2021 13:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611007174; cv=none; d=google.com; s=arc-20160816; b=mVBglL8Mt4NdRf8/wqSygk33tfOkBNDbWxWEyPaDiJ50pVysI/K1NPjGJY11+MFzB0 VoAyQWoGg4Or9W6uNYNWv66As7o7xKi8AJdDCz3ARYvlUZSLSK2ZNtKTkQwGBs4YuDfR BLUcSlUFFzCDkko4knhol1XD/SBAZaWSp3bCOutaGrPa35RQOTdbGACVkTE9SvyhIDjR Q2UsF7cFBXDA54nIl+S+dBjwwfyil83Tx4jaWIVVFvloFAFFejIlD0YbYJALJ7arBByi nD3r7zAZ0K3tqxoP73s6L24HcjyDPs+R1GojxIQRuk0IxtqPTmYFBPT7/CvlEOa+BMX2 kQaw== 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=oatfa8Uxac5y+QfNKWVhpzcqRMF9g7xn6+1Ypo2kSWs=; b=L4dt8T/xX4vUaMWRKR0+paH2NzFG0cF0uzO5A3rjzoCKzNXweHTBZn6r4pwWK0jh2R 2SUcrvrUbUKjc8lLf87D4CaroZq+Mg666N8Q3dLCPz4Fa3N0JqznYnFtnI/7B8JyObZx P3y4Nsrl+Kf+oBN+/FtA6WXOo25ekllr0a8VC9jNLVKmtteDDFxD6tCNJJ7XFPr/Z5ps JkIAj/jTfgt9DNApgl0+NO38etp/5Oq7o6EihII6VdDNti8bhL4b+2TJzD68NioKyj6s 3syB3X2H3w0IndbLvbJre2hanTHx8OHS+xC286N0+5D7C1P7qDgeyBjDGtkeCOb9/orS q8dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=G9OuzfiK; 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 gu1si7116007ejb.20.2021.01.18.13.59.11; Mon, 18 Jan 2021 13:59:34 -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=G9OuzfiK; 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 S2387481AbhARV5e (ORCPT + 99 others); Mon, 18 Jan 2021 16:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730054AbhARV5d (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 CD85DC0613CF for ; Mon, 18 Jan 2021 13:56:52 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id ox12so1417039ejb.2 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=L4UJq76NzNcugRGM8pJGw43rDQNqP9tUTOMhh6oPuB+8gdUmRXCrE//70ylfQjKUq4 0UpfTOUjcKVTQhsZxaTzV0FVCztIjQoDzSCyiWFQ+pVqIOxcKMsAPhBvhO/ncygCsCZM 4/xxNbnppPJ0NEPwDeARC6UCvPYc2HmfEqNBNmgtwEYRIlXNS7K7xnscXSsiPlzerder MirAcQIJY0nznMIxAp5fpnjgXFt0m9x6bMHGdu5xBF5xhaLcIRdfmXuW70rUEYLt5XO9 ZZiDb18pN1jflIf702dJ8Je33vdSZZtzbtbtmGvxXmkSAleRTTbk6OI8Pgt8fmlZi3md EVwA== X-Gm-Message-State: AOAM532zmOzcWRhL86W8byYGUsHvMwJOMdHi7MfUpxz2IGR7rowSFuVA OjDgLoGc4FPHxkIBXTx+Y5JurmugF7aRdiJcPyo8 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-kernel@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