Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp711194pxb; Wed, 20 Jan 2021 19:33:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeQ/RyQkZYIvqLrtNEJ8RDjtuGtTD6PUmZeZCNAyOfNjXrEN0JbxxPyUhYAmLFAlKDVjtr X-Received: by 2002:a05:6402:784:: with SMTP id d4mr9988841edy.20.1611200002513; Wed, 20 Jan 2021 19:33:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611200002; cv=none; d=google.com; s=arc-20160816; b=C4jrYF/KaYBFpM6SdusbaZV2WuVFC56KqcVmFzitmBdXn2uNl9u+2q+mObnXMI8is/ eLT2l34W6mFXK9AijDXpWcMd5HltyiBbQPEu1NZciVIBCcyg2Cv1N0hNwDy/KkY26FWd aIcSPVVmBN6Tfr378UmJEreH8mF1T1iiehB8fPBGrSidhDq+ygKjBvhlc83P9WgR3Zjw xezhjUq2qJhqrOj+sY/Ujj9KVa2f81wDYXom7vTJBkyjyXR9zvOYiy3iq+rRJJA5bBkE 52VIk+1sZRNPm3Zvdmw9pa9rNQoOaxYIoq9mRWcOtQUhzPZkOR+RwLHGfL6aWo2VASAu NtvA== 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=Vp+AOE092k68RqEbMcBCp9/Ukm2GwYnsZJxTSLbTqcQ=; b=v/SSkgteJmF/zqFvZhLQIoHyk/vnuuvQ6k4CBx9U/0VTzcL4Dte9TjtjnjE3S5ZpIu TzGBjodt+mPjTcSXy1haMLYgYGwAdoC03ahDzgETuEl7GIWxHfLSKy3SlVF8tKtsW9DE jn2er/x1Db430IdE1tS/oF4PLMaRPKnFWZK/J2Pf8e+ntb7Pnk3baWm+1nooRmgdrZ3O oWbr0ead85Cb9u/AU2oq26w8ed/SkiWksjJMJqU2TEV137pHo30QrnTGEp8tBzMBHGH0 KxmnJy9bXdTKc+3Nr2l/ojq/Jeg7o+VAaUTvH8K8VHbT9jfYF+GIJ3nE+59ydyYjbPkQ 1/pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fk76+8fp; 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 ce15si1258846ejb.507.2021.01.20.19.32.59; Wed, 20 Jan 2021 19:33:22 -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=fk76+8fp; 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 S2392239AbhAUCnH (ORCPT + 99 others); Wed, 20 Jan 2021 21:43:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393193AbhAUCWf (ORCPT ); Wed, 20 Jan 2021 21:22:35 -0500 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C068C061757; Wed, 20 Jan 2021 18:21:55 -0800 (PST) Received: by mail-io1-xd35.google.com with SMTP id p72so1033523iod.12; Wed, 20 Jan 2021 18:21:55 -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=Vp+AOE092k68RqEbMcBCp9/Ukm2GwYnsZJxTSLbTqcQ=; b=fk76+8fpscXt1+UtR91rPJtqdpvBCfunS2NPWqFQX9XISsq0PZ8sH/qv3WZdswrS9q DBvz/hwuLuOnz6LxyrR7Yg2cPoY4IKujYQXSSn49u8Kkkg6rP2pKxo/xivj/vVkCUvaX GE4dNzLplqnAjW6YqsjmA4/fcWuv7lVhMETdXXNpzjr+coY5QFZXIM+yX7an5C0WMM6V DMIOD4AF9DbkiQn2A4iZLTa7HwNCn4jHMABDokxaHtRcA19scknWYvHCZnbWMqRfCCi0 LusnYl4D191C2qNGhOnqQ5GiFFD3u9ED0FlIKYxc5Y8Z2zVkUsrC6c+cRQ001FE1AmYf snAw== 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=Vp+AOE092k68RqEbMcBCp9/Ukm2GwYnsZJxTSLbTqcQ=; b=Nl7CwRVBADKK7a/Dj6HEDBeS3S/AGLR1R6TMgf3MNIlujO9CEBMUfFIg+xBTkGHXku VcDRTATZGk/jPyJzIe9CHEQr5mzXXaczn1XR5zuj+mm7s/+YsS0ugmfmHdLlVUDGyQiV bYRwEuTzaj4vLj0k6zz/iDF7Wmz1eNY1J8TLpTTBqdvc88KRaMIN1FfHBo8+sYgISF5W RBkZem4GDXzF48WE8bFw6WxV20a4wv7BAvHslB368stqCTzdWV1AoIGg8BKhJs+MFUVi abEYyrSCZqbFQ+vGWWYZ3f4AV2kW2eoYp8xhW1h5c3yauc8zVb9y0HCdoc3E/+wL2RZL 9J9w== X-Gm-Message-State: AOAM532bBpgxnM/A1WNaa/2clePiLnPOmhzFFxvub0ga9CubOCD0eOUc 6PjXOnHa6Hm0hBTvJJNMGAve3gHdsuL0Lh2zpvY= X-Received: by 2002:a02:2ace:: with SMTP id w197mr10061595jaw.132.1611195714793; Wed, 20 Jan 2021 18:21:54 -0800 (PST) MIME-Version: 1.0 References: <20210111081821.3041587-1-morbo@google.com> In-Reply-To: <20210111081821.3041587-1-morbo@google.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Thu, 21 Jan 2021 03:21:43 +0100 Message-ID: Subject: Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure To: Bill Wendling Cc: Jonathan Corbet , Masahiro Yamada , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Clang-Built-Linux ML , Andrew Morton , Nathan Chancellor , Nick Desaulniers , Sami Tolvanen Content-Type: multipart/mixed; boundary="0000000000003e955e05b95fbcbc" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000003e955e05b95fbcbc Content-Type: text/plain; charset="UTF-8" Hi, When I looked through the code I wondered why we do not add a "CONFIG_PGO_CLANG_PROFDATA" which can be helpful when doing the PGO rebuild with a vmlinux.profdata. This introduces a "PGO_PROFDATA" to turn on/off to pass "-fprofile-use=vmlinux.profdata" (see CFLAGS_PGO_CLANG_PROFDATA in top-level Makefile). If we turn off via "PGO_PROFILE := n" in several Makefiles - we should do the same and add "PGO_PROFDATA := n" to the same Makefiles? Please see the attached diff. Regards, - Sedat - --0000000000003e955e05b95fbcbc Content-Type: text/x-patch; charset="US-ASCII"; name="CONFIG_PGO_CLANG_PROFDATA.diff" Content-Disposition: attachment; filename="CONFIG_PGO_CLANG_PROFDATA.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kk689dua0 ZGlmZiAtLWdpdCBhL01ha2VmaWxlIGIvTWFrZWZpbGUKaW5kZXggZGQ1OGZjYTY1YzlmLi5kOWE0 ODI3OWM0ZDUgMTAwNjQ0Ci0tLSBhL01ha2VmaWxlCisrKyBiL01ha2VmaWxlCkBAIC02NjAsNyAr NjYwLDggQEAgZW5kaWYgIyBLQlVJTERfRV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