Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2861293pxj; Mon, 14 Jun 2021 08:48:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWZ0AB6FW7DOhEhpdjl10xJSxudh5v5lQIhcDSoTARBzyMr/brgzucxIM8O1Wv54IDFruc X-Received: by 2002:a05:6402:344:: with SMTP id r4mr17490245edw.226.1623685697767; Mon, 14 Jun 2021 08:48:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623685697; cv=none; d=google.com; s=arc-20160816; b=xjyvfhiqP6jtLSSKETHByPAmdTA7zD2nKYs1wP78vWcdVPrLinmGDDmLBLSl2SBLLj I+GjNVCJSQSNphSZPOBXruPPkREdjnlC/bsLaStkz+v1MDrXTniLDga4JMPyh8GWD3gU 5eqGY0LccwncRbJj8UCH0XoCWQu/9qsZsjIsTigrt2CwF6JV423XoYWmEnN24On1YXSS ZPw7BGhjd8UewAIDzdtLdQq2sC8V7KwXR94WxNs/e6gDMfoQk8CTZxENy3GdDOgPB8rU OQbfuztaYXYxND/ZXucX6/1JZkY3QdrZ5MZFx+zm1Oly7DE02rZZj+yIIkqYTQJ6a0Ev 9xLQ== 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=QYZbYwbmFAlPHZAyueGumfXzbFC24Yyq8ZlF/TwUjkw=; b=Pk2XtN8wqaAFiGshTBoYU48ckM2RAAK2GGISFi+1jybYmGMBjLPyPQZNxMIkQemnYV ca2lVQuAoALHHZOH+vlirVJiDGAQ16+r6fA3ISLVy6f9GdnMgPhkdYvhgc5yv4NPTVVS f+rGuzvf6sY+Nz+0lRdE8LStO2kLYFAu9vcJ/ckfJYNRoJoD2OzPn4GfLM6+7I+J7zgh t7pwNoAEluHMZ8DuSfMN/rysVCXrwROFe5y1BDXgpUOZAD59M8k73U5U+Ou9zGaHytuk eAgyD6xLBAf9LMmLRcZ2gR+LAd5vvNgzBic/klIexTuOHftyQdKYZpneM1x8NhKK4SDH NfQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=ng9emBsk; 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 g1si8254516edn.478.2021.06.14.08.47.55; Mon, 14 Jun 2021 08:48:17 -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=ng9emBsk; 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 S233956AbhFNPs7 (ORCPT + 99 others); Mon, 14 Jun 2021 11:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233591AbhFNPsy (ORCPT ); Mon, 14 Jun 2021 11:48:54 -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 D2777C061574; Mon, 14 Jun 2021 08:46:51 -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=QYZbYwbmFAlPHZAyueGumfXzbFC24Yyq8ZlF/TwUjkw=; b=ng9emBskU15gYywjflfBygUUYq eZHcqnywd14BX7LrL+alDCm0LnySQDWq4iU5112HvNNg8M9WeWAFpHtcnCNy1m7/RAtd3uoU5kHqx 3n7b//QR34Ya51Ibwh7AL+Hrg5Pu9c8AXHQ1J48AC8yPEdDxiXY1NDtNuxvlJyClCAibpqq0jSpgX T8ugRG9ZgSkfhlWL07cp8RL/10viIyiH/mJg0UtzLFLJJ17JbOW5q4EEFgngzlM4uWdx4u8Lf7A3m l9AOVyLGrfjESKUHcACVgTEINhvOvr3+gjTRoIw3OE0eUSuUFnG5NKtzvzGFg6XQqqV5mOnWnT/Ft Dh/UFbWw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsonJ-0074ny-On; Mon, 14 Jun 2021 15:46:40 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id CF1C59831CA; Mon, 14 Jun 2021 17:46:39 +0200 (CEST) Date: Mon, 14 Jun 2021 17:46:39 +0200 From: Peter Zijlstra To: Kees Cook Cc: Marco Elver , Bill Wendling , Jonathan Corbet , Masahiro Yamada , Linux Doc Mailing List , LKML , Linux Kbuild mailing list , clang-built-linux , Andrew Morton , Nathan Chancellor , Nick Desaulniers , Sami Tolvanen , Fangrui Song , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Andrey Konovalov , Dmitry Vyukov , johannes.berg@intel.com, oberpar@linux.vnet.ibm.com, linux-toolchains@vger.kernel.org Subject: Re: [PATCH v9] pgo: add clang's Profile Guided Optimization infrastructure Message-ID: <20210614154639.GB68749@worktop.programming.kicks-ass.net> References: <20210612202505.GG68208@worktop.programming.kicks-ass.net> <202106140817.F584D2F@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106140817.F584D2F@keescook> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 08:26:01AM -0700, Kees Cook wrote: > > 2. Like (1) but also keep GCOV, given proper support for attribute > > no_instrument_function would probably fix it (?). > > > > 3. Keep GCOV (and KCOV of course). Somehow extract PGO profiles from KCOV. > > > > 4. Somehow extract PGO profiles from GCOV, or modify kernel/gcov to do so. > > If there *is* a way to "combine" these, I don't think it makes sense > to do it now. PGO has users (and is expanding[1]), and trying to > optimize the design before even landing the first version seems like a > needless obstruction, and to likely not address currently undiscovered > requirements. Even if that were so (and I'm not yet convinced), the current proposal is wedded to llvm-pgo, there is no way gcc-pgo could reuse any of this code afaict, which then means they have to create yet another variant. Sorting this *before* the first version is exactly the right time. Since when are we merging code when the requirements are not clear? Just to clarify: Nacked-by: Peter Zijlstra (Intel) For all this PGO crud.