Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1201961imi; Fri, 1 Jul 2022 05:18:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tSXVSXLD4Bsa+Ng5IbvrIU1nK6YQ6aw7SR1qjKIaTiCxbsqlmCctOvGUA/wLPQSS4sfpl/ X-Received: by 2002:a17:903:1246:b0:16b:7f81:138 with SMTP id u6-20020a170903124600b0016b7f810138mr20864876plh.141.1656677931369; Fri, 01 Jul 2022 05:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656677931; cv=none; d=google.com; s=arc-20160816; b=vguLDL6eso5d4NQsw58N/rXOhPe9xHQltvbLxjhqPriT6nf/JwGHmnnL+SHQYgU/8S yzjgUftZhuzrKBN0NGQbO7yoOZUvWe/9g0rCgmRAsyG5mTPy1iKLsctap9L91GjVnjFp l/IXxJllfsNNZRLXuvswarmtRDEmytK6nLhC5InLujSyHzYd83qDiyGtaTyggammc5QO qYy6bW73zzXEm6b2mW0bjj6V1dnM8ulUyLQHa7UZVhJ2JnSWYnF2wFOV0C/6toPTZmC+ N3qRVLnb+03qGTx/CUR4rKOrEuMEWPo+W7aGviV6eJmJplAOL136OfcdB6pts9byP3gp EMJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UX/SPs8AC13vxFn7udG5iZupPxFPMinilIfXi14X6yI=; b=a/jf85zViOssBErug/Ft4qO85tsI7qYYehYPfTJsT0ZyUucFQ1f2/CgtvhYybpCje3 L3J8YHmJlDd+Df0yIeqfMg94AvPZhBZ9HarN8rYcqUE/39ufhTskuz3HdvGeKlenpDQM 8UKtXnCSAkeo0+rrVgUfy9qljG085eO1zw5kRabcezYyRf5VsjaUTERSMFZ6oNYuzqH2 fEM/DCvi2oD7ny+WGSz2mzXQ3KQUFUpGoCeC0cjb8Ns/E5s9cOtJiPCKV84B0fXC5MS9 mtpC3PEJzX737LvH9o3pMWsQWQvq0ywcqgIboj7dPMhqDIPmNcwJY/KykJDzpXDZxOGN pavQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=p+Iu9slg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a67-20020a636646000000b00408ab3d13a5si26384464pgc.788.2022.07.01.05.18.37; Fri, 01 Jul 2022 05:18:51 -0700 (PDT) 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=@infradead.org header.s=desiato.20200630 header.b=p+Iu9slg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233748AbiGALuN (ORCPT + 99 others); Fri, 1 Jul 2022 07:50:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbiGALuL (ORCPT ); Fri, 1 Jul 2022 07:50:11 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB8AF7B359; Fri, 1 Jul 2022 04:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UX/SPs8AC13vxFn7udG5iZupPxFPMinilIfXi14X6yI=; b=p+Iu9slgFv/zhQjTx/TwgcF1bw KEsuiLka8WujytnL4A/5OFQfsl5izPf34rnL0qELacBy9tEMJwy6tNZcRQiogyPvG5pAT43dce+8R Eaw9GyGCS0OSR9cHmSizkCibJ65LocJh03+deCaAWoKQe2GmXcs58TReu9zk726IT1C2FH+CJQIel QrnzDO/CYybl8Ec2+sUAtfOXGvPU3l/StA1oyYlEoZq/7sxU/Tw3U9PRKDK5TrN+9t1QoLyMF7ocI J0Ws0b6CX2QfKaTtqFibOVVnIaSICsNmN/aO0T0timB88x9BFZ9ti/LB4q1Xx/3DjxYDCu0blVrCF 4SqShj3g==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7F93-00FhQ8-DU; Fri, 01 Jul 2022 11:49:10 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 18CE5980022; Fri, 1 Jul 2022 13:49:07 +0200 (CEST) Date: Fri, 1 Jul 2022 13:49:06 +0200 From: Peter Zijlstra To: Bill Wendling Cc: "Jose E. Marchesi" , Ruud van der Pas , Nick Desaulniers , Sami Tolvanen , Vladimir Mezentsev , clang-built-linux , LKML , Yonghong Song , Wenlei He , Hongtao Yu , Ingo Molnar , linux-toolchains , elena.zannoni@oracle.com Subject: Re: plumbers session on profiling? Message-ID: References: <87mtf7z0rt.fsf@gnu.org> <6F9E9D93-3913-4022-9384-D809C8EF7715@oracle.com> <878rpgpvfj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01, 2022 at 03:17:54AM -0700, Bill Wendling wrote: > On Fri, Jul 1, 2022 at 2:02 AM Peter Zijlstra wrote: > > > > On Tue, Jun 28, 2022 at 07:08:48PM +0200, Jose E. Marchesi wrote: > > > > > > [Added linux-toolchains@vger in CC] > > > > > > It would be interesting to have some discussion in the Toolchains track > > > on building the kernel with PGO/FDO. I have seen a raise on interest on > > > the topic in several companies, but it would make very little sense if > > > no kernel hacker is interested in participating... anybody? > > > > I know there's been a lot of work in this area, but none of it seems to > > have trickled down to be easy enough for me to use it. > > We use an instrumented kernel to collect the data we need. It gives us > the best payoff, because the profiling data is more fine-grained and > accurate. (PGO does much more than make inlining decisions.) > > If I recall correctly, you previously suggested using sampling data. > (Correct?) Is there a document or article that outlines that process? IIRC Google has LBR sample driven PGO somewhere as well. ISTR that being the whole motivation for that gruesome Zen3 BRS hack. Google got me this: https://research.google.com/pubs/archive/45290.pdf