Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2468907pxb; Mon, 18 Jan 2021 20:14:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7x1TrUWM3uZZLCtWiGrqiS2I0OWTV/v67uNRhk4T76reHfOhA1e/4f2/kFXL5gk01G3uE X-Received: by 2002:a17:906:a284:: with SMTP id i4mr1695741ejz.124.1611029668211; Mon, 18 Jan 2021 20:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611029668; cv=none; d=google.com; s=arc-20160816; b=ICmpI2z4GvPhQUK4AtS1yLLfI21FHrnF6aYh6xvsCoCxEz32dinAD10YbGUPDjgvfU QLDu3ULFwq+yOoDoa6UY6qbQH6lsBYn1m9jDqUeOjRs6Q50zmLQIkQ0/6pILdfTUO7t7 iMZV77heJcH7q5lEkulmH0OrzrPqRoi3zkKpt22SJxHsuM54tCfC2fSMuJHesSJ+cZZH W4L3hvqGEvtZ2saSCbVRW/UK8N7z1QD+hqFTIG5BF7Z2og9z/hbUVCKuq9Lhpj5XKZwx CU4o2nxc5K+N00t+BWVfPVmh55DhYlsa39ICEGwrREPBMRYQnQQuobSUaRYKTzSUEpPH 6bMQ== 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=/0ekt6oq+WlNqCRvHUlDFjjWLqrVQZ0WTiXLJub6TII=; b=i0WJ8XpeDKQjUvSjkAbvXK2hOtLsrECH7xqIi6eWKQ3HKHzHu595AFlkUArDtW2cSN oWFj4XZudT9KsEKi4XtZYv2sNGH7IKoPM5QZrdok8jQ91sHjAu2+HL9qN/du+fuIa6hK SIvxyb4zkVLgmDkjgjIK/YrZiwrkNgVosfNSboBYbYlsJMZioiz08ZEo87lu5PRYzAzf 2+C1kjxa0vVzXqExt857zafmhgfrAvd/ZKY6MLibG2Vy5dLXhEolMn4fStEeJR6Ha2GB DSaSKVgGucMdWO32m151OWCJ8F9q9Vm6/cj3M2cukArTKYF9KI+9T4NJNi//Hs3ltDwz /sVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EuJrgbYO; 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 a15si6336642eju.226.2021.01.18.20.14.05; Mon, 18 Jan 2021 20:14:28 -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=EuJrgbYO; 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 S2391929AbhARMqL (ORCPT + 99 others); Mon, 18 Jan 2021 07:46:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404070AbhARMjz (ORCPT ); Mon, 18 Jan 2021 07:39:55 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA48BC061573; Mon, 18 Jan 2021 04:39:13 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id e22so32431953iom.5; Mon, 18 Jan 2021 04:39:13 -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=/0ekt6oq+WlNqCRvHUlDFjjWLqrVQZ0WTiXLJub6TII=; b=EuJrgbYOcyXpDYrS4gzh38ZbG5H31XHAgl/f+bwdQYi02raaP0x2yOu6thClppbaGe 176k2GtIJQRIuIclnFzmJSRQdqDlHVKvhReRhVrbV1zX7HH2N2wESKsI5hqjhK+XJojE 9/yxOMvHX3lSwzATnj5aThd5cuieVDGQp1+eDFc63NldL0Zkxig1aGSNpnt4CvODWPxs R5Dtcl1cXF9rLBYFlUKGUcuqSuZbMHPCFCMNSNnRkfWZ95LuPgUXyFoAHZMxTBPsupdU N3Fual2nqFL6cSPLndFT5VlETMfoO8fussQJymQ0ZdKP6TEEwLlzHVdmc2WDFuE5VsFV DtZQ== 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=/0ekt6oq+WlNqCRvHUlDFjjWLqrVQZ0WTiXLJub6TII=; b=nnR7oelH22vb1zr+Z1xyG4xeUp9M2Ux9H7nQPiKJSqhBLn1phMPVsoDBw3mr5cTJmT N95YDFHop30F+gWWrEGYiDDVPlYS/me/IOYhEzFZ7yHsV+6ptcgnDqpkMfl9NHlBsZL9 qwy6rCs03Z/FH91qTTz1t1Jj+SGiYYWgDVoQ58UUUcvgPhzoa3cQwnJW3lgozhkwmZeT GeW2bylM92P+riuY698KY1+kL3OizjvHFlM5yY8kUyLSeaWc4E7dnfSLGV/gu+XFeDA+ Rp1U20KSOGua7K0VsX4jTKN0BXReBvT7CCwd7WSdpl9DE8mbqq6crapLNvLyWbFq+B3L ExoA== X-Gm-Message-State: AOAM530OB5XFTyiaBMzo01Lf3aiGxVDwPWUyhSknn12xkSNFzbDlUg04 mGJTqPfZdkKg1Y11oAMVTUN8GVq7FvMLc++kTxxXtnqiA1GFHw== X-Received: by 2002:a05:6e02:d0:: with SMTP id r16mr6888410ilq.112.1610973553097; Mon, 18 Jan 2021 04:39:13 -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 13:39:01 +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 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 - 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