From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7D3BC43334 for ; Mon, 4 Jul 2022 14:02:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbiGDOCE (ORCPT ); Mon, 4 Jul 2022 10:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233557AbiGDOB6 (ORCPT ); Mon, 4 Jul 2022 10:01:58 -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 75F4FCE2B; Mon, 4 Jul 2022 07:01:56 -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=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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.