From patchwork Mon Aug 7 11:07:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 131876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1401862vqr; Mon, 7 Aug 2023 05:11:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAdakgt668qyqakeoaTZZR0pXTuL2ioYmfR2HX1l/hgmNrotzYilCa49V9U2dLqpZcDCIu X-Received: by 2002:a2e:998c:0:b0:2b9:d3b6:769e with SMTP id w12-20020a2e998c000000b002b9d3b6769emr6774324lji.24.1691410265347; Mon, 07 Aug 2023 05:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691410265; cv=none; d=google.com; s=arc-20160816; b=ClVbcKD9HKb32++Q7ANGbwQUcJA4YgbcgBRSpcpsPyIOb3Lfm32Eh2yBSEC5iYgyTX NqdWEUDehwhVCfx3xTy3V2u+NRNtjbDmGacllMIQKiKc4npSDY1xMr+B3WPBw4hPpKs6 Xlz0Xs7t/e6bAexeG/zLhbbmuZDCEgvdQN1lIu4lyAXhErpbAFF7WnMMjHVf+k4HaqTI IU3yVNkCVXSyAzIRiEXccQmVxs6ljc/Y4Kp/FlQfdEDlvtd84lECkvGFpABYvCRKNO+i tj/a4UV+UDUnFqAVrKGtY6b/o2JtNRa64Hx3VmT0BFMjjqKAHUmYD3usWsCfdEMVbuEe FsEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=N38VdLXO+fvs0X3IIGpcAZWJismyR+3nONRH36zpcHU=; fh=c52W0PXFGC4RCQIlxKygkq5VXSkzeg/0BsNnEf3roKg=; b=CAS7/Bped5zdixY/1aktJLtJKvnGjzoWpgFlU9WTl/v24uItOB5jGATE9xQb321KgL Jfn+UB3kLOBCuqqnrOO9V5gxzjYWsyHmuRIG2KcUizwWWD+53gJl0g9ZjEaKxM3F2T9Q wAo5Uf+af9TrYcxN7EXWdhJ5EQAqpl5MQqxPHt2ZIto4fxauu0GLkE6xeSPSsVUE0/Ld vBoDYpAFXz1MA5fR75kAVfGcVsaEZcrGXwcp8e2pISHRfPKCCKmEqkkdxZDQUjIsnBPs r1xsD94Fn8SB1laI3R6wF21NU1yOqbVe2p6lma1N0BgMQsmZBHoazlEnic8sXttjzMDh Qy6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=go9YJry+; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bx22-20020a170906a1d600b0099279b2cdddsi5783178ejb.833.2023.08.07.05.11.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 05:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=go9YJry+; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 222E13838A63 for ; Mon, 7 Aug 2023 11:42:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 222E13838A63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691408573; bh=N38VdLXO+fvs0X3IIGpcAZWJismyR+3nONRH36zpcHU=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=go9YJry+UIBDAnJs0UG/IKcKCu8fuWEFUUCngXEqyfoNq69x3lEBWSWv4I6Qf1ffk 5puff19L/EenGV8mbkzEqJhH9h6bhXuxOZQkf/iFZLTuA8fHqOF6IAjuPkQxfu9Iip ve6KgOY79ueXmH1gOjPgfSlQIr9nhAxIgtfhj6Dk= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id 5F0BA3856DEA; Mon, 7 Aug 2023 11:19:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F0BA3856DEA Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4RKDPN5CNlz9sRD; Mon, 7 Aug 2023 13:19:52 +0200 (CEST) To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Eugene Rozenfeld Subject: [PATCH 37/45] Collect both user and kernel events for autofdo tests and autoprofiledbootstrap Date: Mon, 7 Aug 2023 13:07:40 +0200 Message-ID: <20230807111029.2320238-38-arsen@aarsen.me> In-Reply-To: <20230807111029.2320238-1-arsen@aarsen.me> References: <20230807111029.2320238-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Binutils?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773572210192997358 X-GMAIL-MSGID: 1773572210192997358 From: Eugene Rozenfeld When we collect just user events for autofdo with lbr we get some events where branch sources are kernel addresses and branch targets are user addresses. Without kernel MMAP events create_gcov can't make sense of kernel addresses. Currently create_gcov fails if it can't map at least 95% of events. We sometimes get below this threshold with just user events. The change is to collect both user events and kernel events. Tested on x86_64-pc-linux-gnu. ChangeLog: * Makefile.in: Collect both kernel and user events for autofdo * Makefile.tpl: Collect both kernel and user events for autofdo --- Makefile.in | 2 +- Makefile.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index a00ca072b47..406bc40274f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -405,7 +405,7 @@ MAKEINFO = @MAKEINFO@ EXPECT = @EXPECT@ RUNTEST = @RUNTEST@ -AUTO_PROFILE = gcc-auto-profile -c 10000000 +AUTO_PROFILE = gcc-auto-profile --all -c 10000000 # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still diff --git a/Makefile.tpl b/Makefile.tpl index 485b2f16fd2..45facbac6a9 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -408,7 +408,7 @@ MAKEINFO = @MAKEINFO@ EXPECT = @EXPECT@ RUNTEST = @RUNTEST@ -AUTO_PROFILE = gcc-auto-profile -c 10000000 +AUTO_PROFILE = gcc-auto-profile --all -c 10000000 # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still