From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 168BA46A3 for ; Mon, 4 Jul 2022 14:01:52 +0000 (UTC) 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=piYqBJeFz7D47ap3/7x8Zet4UDXF1mtxAPCnP4s0dzE=; b=GFDrlTaniO6lVyB2FKMvwa+SVf jJ2V9XKZikOZ2YZsn3ZEbSIdq5cxpOfEFF16XlM8t9RImmj5r6dZiu/cJjLtenOaqLWGahIZxOlsY YTFMfgE6avgD+O7TCQt/FEe5nTgRj3z+EMr3ZcmHygQhZVBsEMKzIzS0OhRTva8WoSusU1l0Bq1xb onsQAO+Z8sLNHG24ay/3aYI/5y8lymwSor915ccm7RukhyYdSGzDxMq7qK/crSIHRjrMie4cHiGel M1qqFpyMumUP0YmQKHg+mfEr95KpQ5fTo7UD4pXrT1x4UvN07pQA5x5WUqqRnRtcIRQmtxu2WxFCz fpQuM6RQ==; 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 1o8MdW-00H9PD-J5; Mon, 04 Jul 2022 14:01:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 60ADB980057; Mon, 4 Jul 2022 16:01:15 +0200 (CEST) Date: Mon, 4 Jul 2022 16:01:15 +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> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jul 01, 2022 at 11:57:25AM -0700, Bill Wendling wrote: > On Fri, Jul 1, 2022 at 4:49 AM Peter Zijlstra wrote: > > 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 > > > Right. However, there's a chicken-and-egg issue with AutoFDO for the > production kernel. We can't release a kernel that hasn't been compiled > with PGO/FDO. We could only release it in a test environment, in which > case we could use AutoFDO. However, the document says that AutoFDO > only reaches ~90% of FDO. They list some reasons for this, but > nonetheless I suspect that the delta would be too severe for us to > release the kernel. The pertinent question seems to be what's missing? Where does that 10% go. > As for LBR, that will work with Intel/AMD, but I thought that LBR > doesn't exist for Arm processors (my knowledge could be out of date on > this). Not totally up to date on the ARM thing either; but I believe you're right in that they don't yet have such a feature. > What would make PGO (sample-based or instrumented) easy enough for you > to use? What're the key elements missing? The key piece missing is how to feed a perf.data file back into the compile cycle, something like: $ make O=build/ PERF=perf.data -j$lots would be useful I suppose.