From patchwork Mon Nov 21 21:57:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugene Rozenfeld X-Patchwork-Id: 24039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1854752wrr; Mon, 21 Nov 2022 13:58:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ihLf78ZCzYCqLFbl26zYFh86Mj5NxfUsVRR5WskM28euiR9idPPJi9oDYORVFGWd92MNO X-Received: by 2002:a17:907:8c8e:b0:78d:4167:cf08 with SMTP id td14-20020a1709078c8e00b0078d4167cf08mr2154298ejc.337.1669067921522; Mon, 21 Nov 2022 13:58:41 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ht22-20020a170907609600b007919dbd3770si9672301ejc.485.2022.11.21.13.58.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 13:58:41 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.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=@gcc.gnu.org header.s=default header.b=TKFcie+H; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C6545384F4BA for ; Mon, 21 Nov 2022 21:58:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6545384F4BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669067919; bh=r2kegHmAZWFZhSujSSU7Dz5IuCT/G2HssE/jvVUdK6A=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=TKFcie+HEfyZqOO4n0XnbgcYHO5VO3j80rjMOLcqfGhekUDQgFUtCpxafXeV1uEi0 YszRnXL9j8cVt+vh73ljaO21IYPTzpv042WdmWznMxryijxIWgCiHNuf2k89SC4L6o qU4TNk9hgbmddPziGJhn2+j1SEsWlyFoLxfwd47s= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from na01-obe.outbound.protection.outlook.com (mail-eastusazon11021025.outbound.protection.outlook.com [52.101.52.25]) by sourceware.org (Postfix) with ESMTPS id B3CA93852C47 for ; Mon, 21 Nov 2022 21:57:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3CA93852C47 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iv8FqXPi2dsUIWgCSVXZgt5YRC/9lv4zruNP6zTFukMCN/JhULUklGIF2QepN7lGZStmF9aCewHr9CoQQFFgw9XBj36mBgrYacG5KhnPBD1zdQG6akXaWNkSAd8QzIcWxH9fGZsNg1WdHlyf4gHssi8MFaHnWx3iGMXDhlvX8+0XwP8AjJB9HBaruH+Y34unXJvJOn41wZ+o9YGI09YmAQTA5tdI++bs+Ix6luw3Poftc9pf8/8n9PjXipPxvzuSuQLTGLAWtpbaEavmNd/uuSMgha/bCTT3pFgsL2ISnVIUwoxIhFmtGuA08w0YwaTwSeYmXvoJMZppo9QJl1IrAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r2kegHmAZWFZhSujSSU7Dz5IuCT/G2HssE/jvVUdK6A=; b=lr7urYB0h6i/D6gUbpOzmBgPMX/Uch/ATpagNrx5nhonKjWPZcn+eBQS+A3BMBuXqdoyZIyuvdc4mQFhlR2MCpOiJrBYVXPabqnCdCyIBsQqmYsn+/9tSOC9YYhj9Js2pYXgeS1opf8xEbh73A/Iiyxtze7wDPNHBzhBRecyVMtVtVgAnAMY5kWThEqt0W9CrU77W4uHk+G860RJyngHhQJNHso9H/1fDbO9DT/6rLhrdKkkYjGzmofW0QYxw+/56qip/Pw6aNj9HPEJtLm9UU8GuwBAw/OaNzaZqhN6iKGQ5yXTRdeJNNC7L97qG5CipGx98BcFqm3rUzs8q1d+Lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none Received: from CY5PR21MB3542.namprd21.prod.outlook.com (2603:10b6:930:d::7) by PH0PR21MB1960.namprd21.prod.outlook.com (2603:10b6:510:8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.15; Mon, 21 Nov 2022 21:57:29 +0000 Received: from CY5PR21MB3542.namprd21.prod.outlook.com ([fe80::cd48:318d:7bc8:110f]) by CY5PR21MB3542.namprd21.prod.outlook.com ([fe80::cd48:318d:7bc8:110f%3]) with mapi id 15.20.5880.001; Mon, 21 Nov 2022 21:57:29 +0000 To: "gcc-patches@gcc.gnu.org" , Andi Kleen Subject: [PATCH] Fix autoprofiledbootstrap build Thread-Topic: [PATCH] Fix autoprofiledbootstrap build Thread-Index: Adj99C7cjlAgYBhrS1a5NJg98OCmgA== Date: Mon, 21 Nov 2022 21:57:29 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=cbc07895-1855-4450-90ea-5ac96027a193; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-11-21T21:55:58Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY5PR21MB3542:EE_|PH0PR21MB1960:EE_ x-ms-office365-filtering-correlation-id: ad69ccb3-cbd1-40b4-8331-08dacc0b6289 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l8qlv+h+MbxCxOiVmIHLfJRAoGIGyXG/Piwz3gMZXPxNISYcrGoHen1YhITChPgfp+AoytzdIuwYVp1g5zhmbPgQCFbU/+Pu1unupTzdZPx1ftEohjcK92/xJUeIST9abGsqfjt9xTDHE/sAarscnDit6QNqPW07PKSOI3eIrrGodYR8gbc7Mjj/FRba9LbYaLc/tyaVh34GpklXh/KAJjaO6U3cdh4H4LvLAUhAk377kUfCpbyLa6a1MwzT7Tfrg2LFYPXj6d/b5WkiCSFJPQOrNsMhTr8dL0EU187Qo5XveUCgGRkl6iKeyZp46NDXC8CsQv/FdQiqQH0hulEWggzkwL1JyxtPx0rrHdxBkS9boTnG1UXqJvpR8mXP7ROJBqmq5uHb4clOYK1NYsM8wRkciWXh2FlDNLaQZzQiC0nwiaTYhFPvBy/JZk0N7MIWVdWjySqFcmXe5EmLmzPEaK4vEqJFQkhTb8+vLHAyJI26EwkhOIgPj2FkjTg06uowdNchohAmeX18BVt3Zug7cw9RsjNV4n72SXHktuJ9J3PS326UyFfLzdxBBjaden85BMC9JjbHxOq5cGvijqU8I4qqjUE9kpPSBrWuHyhdrV1stj/JwnKu0ygbNrw1mo8Yu9MkLUehCUYxLzCFej84GNpKtOjYYTvZSlyao4A5tG5UZ7hn3nQwWc6qRrjBD2MG7O02kwG+EAjyVmwTauS7YQWTx2fLAQtes+glwAx2vkVZLZ3+mcnn3WcZnus+FWgr1lWWukAmV6GZTCJ3bRwEilq7QcKmiwYm4hi3O1mn+cwTpGnQv9YCvraaH8Oaw+P7 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY5PR21MB3542.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(396003)(376002)(39860400002)(136003)(346002)(451199015)(83380400001)(9686003)(186003)(38100700002)(122000001)(82950400001)(82960400001)(8990500004)(5660300002)(2906002)(55016003)(71200400001)(110136005)(10290500003)(6506007)(7696005)(478600001)(8676002)(64756008)(66446008)(8936002)(52536014)(41300700001)(66476007)(66556008)(316002)(66946007)(76116006)(33656002)(86362001)(38070700005)(473944003)(414714003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: D/Dc/j4FeT4D0pMQti3f2M2KjCSYdNI5cLInUDGv8vLppLg6IQHww/wedAFwgNXo8ql+iKP/uMSRGI9AKNidlMdHQZL/1Kx6At+cvKYiHc5/Lv+OKZpUr5uj+t6pKJ4Lcs6yVXtXyc47l1Scw1IgHmjLk29mbWNS7IPbRPaq1T54uKo6YU3eDEg1UAtzXmFH6avbk6YG8I32My1kLvxjOrL488cXk6S4ze7GZL8/bZGJEJrueCIywfI6Iwl8jCIUNmgssXutHBsRqddp3FmnYwdV789RVjoRYej9Ym+8RFEacd/UgEkJ/ktthfQCc6eM77ZpVwktc3eNZg+sJpVhnGyG5j1Owqkqm5CHlmX6suHg+6jn4k+BuCft6fLi2leesFAjOFGKmwYQTUBKX3o52C8hDD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MI6httc8KmL+3IbT9FH+5DwECEmYRn4PvYxBVoBLAZzEhPsDUT040mhbVCw7U2aC/X5Jg+oPLl9jIn6yhlUedxdD/44012K1IfN6/OLCTvFPBujNQzui/h9gB+MyKGmgSk1sfqeKPefAYe+x4wTLd4XyzV8ZG+gksHJ8GL8rmRnYCf60Po+bJ+VqjWJmSo MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY5PR21MB3542.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad69ccb3-cbd1-40b4-8331-08dacc0b6289 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2022 21:57:29.6075 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FM9I7CectuO430VZn+IKQ/phBQJgvNoeJoBm1c12HDRgylPrDAVfy3MNXiQZYNx/5R1DDh+/1t2rlHsqm5gPWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR21MB1960 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Eugene Rozenfeld via Gcc-patches From: Eugene Rozenfeld Reply-To: Eugene Rozenfeld Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750144565162131208?= X-GMAIL-MSGID: =?utf-8?q?1750144565162131208?= 1. Fix gcov version 2. Don't attempt to create an autoprofile file for cc1 since cc1plus (not cc1) is not invoked when building cc1 3. Fix documentation typo Tested on x86_64-pc-linux-gnu. gcc/ChangeLog: * c/Make-lang.in: Don't attempt to create an autoprofile file for cc1 * cp/Make-lang.in: Fix gcov version * lto/Make-lang.in: Fix gcov version * doc/install.texi: Fix documentation typo --- gcc/c/Make-lang.in | 15 +-------------- gcc/cp/Make-lang.in | 2 +- gcc/doc/install.texi | 2 +- gcc/lto/Make-lang.in | 2 +- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/gcc/c/Make-lang.in b/gcc/c/Make-lang.in index 9bd9c0ea123..ba33ec03bf0 100644 --- a/gcc/c/Make-lang.in +++ b/gcc/c/Make-lang.in @@ -62,12 +62,6 @@ c_OBJS = $(C_OBJS) cc1-checksum.o c/gccspec.o # Use strict warnings for this front end. c-warn = $(STRICT_WARN) -ifeq ($(if $(wildcard ../stage_current),$(shell cat \ - ../stage_current)),stageautofeedback) -$(C_OBJS): ALL_COMPILERFLAGS += -fauto-profile=cc1.fda -$(C_OBJS): cc1.fda -endif - # compute checksum over all object files and the options # re-use the checksum from the prev-final stage so it passes # the bootstrap comparison and allows comparing of the cc1 binary @@ -88,9 +82,6 @@ cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS) cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) @$(call LINK_PROGRESS,$(INDEX.c),end) -cc1.fda: ../stage1-gcc/cc1$(exeext) ../prev-gcc/$(PERF_DATA) - $(CREATE_GCOV) -binary ../stage1-gcc/cc1$(exeext) -gcov cc1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1 - # # Build hooks: @@ -180,7 +171,6 @@ c.mostlyclean: -rm -f cc1$(exeext) -rm -f c/*$(objext) -rm -f c/*$(coverageexts) - -rm -f cc1.fda c.clean: c.distclean: -rm -f c/config.status c/Makefile @@ -201,7 +191,4 @@ c.stageprofile: stageprofile-start -mv c/*$(objext) stageprofile/c c.stagefeedback: stagefeedback-start -mv c/*$(objext) stagefeedback/c -c.autostageprofile: autostageprofile-start - -mv c/*$(objext) autostageprofile/c -c.autostagefeedback: autostagefeedback-start - -mv c/*$(objext) autostagefeedback/c + diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 291835d326e..49e5cd66912 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -178,7 +178,7 @@ endif cp/name-lookup.o: $(srcdir)/cp/std-name-hint.h cc1plus.fda: ../stage1-gcc/cc1plus$(exeext) ../prev-gcc/$(PERF_DATA) - $(CREATE_GCOV) -binary ../stage1-gcc/cc1plus$(exeext) -gcov cc1plus.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1 + $(CREATE_GCOV) -binary ../stage1-gcc/cc1plus$(exeext) -gcov cc1plus.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 2 # # Build hooks: diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index c1876f24a84..61a483bc410 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -3059,7 +3059,7 @@ It is recommended to only use GCC for this. On Linux/x86_64 hosts with some restrictions (no virtualization) it is also possible to do autofdo build with @samp{make -autoprofiledback}. This uses Linux perf to sample branches in the +autoprofiledbootstrap}. This uses Linux perf to sample branches in the binary and then rebuild it with feedback derived from the profile. Linux perf and the @code{autofdo} toolkit needs to be installed for this. diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index a2dcf0dfc12..3ee748489ac 100644 --- a/gcc/lto/Make-lang.in +++ b/gcc/lto/Make-lang.in @@ -106,7 +106,7 @@ $(LTO_DUMP_EXE): $(LTO_DUMP_OBJS) $(BACKEND) $(LIBDEPS) $(lto2.prev) lto/lto-dump.o: $(LTO_OBJS) lto1.fda: ../prev-gcc/lto1$(exeext) ../prev-gcc/$(PERF_DATA) - $(CREATE_GCOV) -binary ../prev-gcc/lto1$(exeext) -gcov lto1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1 + $(CREATE_GCOV) -binary ../prev-gcc/lto1$(exeext) -gcov lto1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 2 # LTO testing is done as part of C/C++/Fortran etc. testing. check-lto: