From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2115.outbound.protection.outlook.com [40.107.237.115]) by sourceware.org (Postfix) with ESMTPS id 329DF385742D for ; Fri, 30 Apr 2021 18:48:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 329DF385742D ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SAVwWzCDXPiWlAXlU5CeeZm/wfyv71qBVgk8AgvzRL4Ad/xF6EGBniDhapqw6CkOsn/II5/sky4lZtxP4QMtWACuNPoYeBGUz0U3VdMEpibuQt0ROVevYoJh+AT9x1vr1G4bc15KMrIzmn2Bv9l/CZNw5Fnt9ejuuT6Wa3Z33YyiRngIGrOKOg4jDm5/1mrlZ7q8GzgtVacRKKRpv1Vtkh6NO89WJO4L3plPvK6NNC4nw/sfGv6U1andHJjOyYkG1SV/E8ZctddCj7xPCtQdm2SWNsehmxFkwLiOC/hJq2iO2f8ug+ehaFV2s97UcQ9OSPWTmz7BXYZJ1FfVUFYivQ== 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-SenderADCheck; bh=p/fa141wE/uuUf7KrgYmd2c5wZ7q3vuElhRW6dtvaS4=; b=NjZHWb5xG5JU2cY/8+A0JZZHzavEHpDVVK/0gXsjRl5K/jwokVtFeLumsv4fPXmVXri4DPk39TIgYpLK43yA4X3AGjgGysKpIn7fig5t6tQF/VyB8tv4yWN00BtTHr8rWEGw4RTWPyzP0xbck4KwX+JcFGSwUonv+lEvRf+LTipPqWBQ6U9asU5CEUgHD/ZYaD5LoWG+mJ9J0608zaV9Aoo/udziJpNpUSJtvRvqN+jToVARJ0JcNNQP6FixkxqzCXpk9+ZGzv39HdHdad6Ldfn1dnXI5crtf+Trfkw2QGlAErsxQ9+93TRS+R+UiwFVDzsbzPojBe4zgrY1MuEskw== 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 MWHPR21MB0798.namprd21.prod.outlook.com (2603:10b6:300:128::18) by MW4PR21MB1906.namprd21.prod.outlook.com (2603:10b6:303:67::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.3; Fri, 30 Apr 2021 18:48:31 +0000 Received: from MWHPR21MB0798.namprd21.prod.outlook.com ([fe80::5c91:124:3d0c:9206]) by MWHPR21MB0798.namprd21.prod.outlook.com ([fe80::5c91:124:3d0c:9206%9]) with mapi id 15.20.4108.016; Fri, 30 Apr 2021 18:48:31 +0000 From: Eugene Rozenfeld To: Xinliang David Li , Richard Biener CC: Jan Hubicka , "gcc@gcc.gnu.org" Subject: RE: [EXTERNAL] Re: State of AutoFDO in GCC Thread-Topic: [EXTERNAL] Re: State of AutoFDO in GCC Thread-Index: Adc3sdMagfKGeoXuQ46Crrlm/SEGvwAAp56AAASdhAAADAzWAAAFzmSAABQa3YABZB1KAA== Date: Fri, 30 Apr 2021 18:48:31 +0000 Message-ID: References: <62330f82-201d-af7d-d1ed-1c8c529cc0f7@suse.cz> <20210422222906.GB5803@kam.mff.cuni.cz> In-Reply-To: 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=4b75d84f-ad2a-42c0-bbbb-21e02e049b7d; 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=2021-04-30T18:32:42Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-originating-ip: [2601:600:9700:56f0:81ef:ad4a:2e27:61e5] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 909ff151-9c28-449e-fb85-08d90c088d06 x-ms-traffictypediagnostic: MW4PR21MB1906: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VEpT0EBmNC2qU9lXEXu0ZJqucV/VxBunvSlFKtZMUp+w3SkLe+oUXZvHsaIGzMyrSvXbvwEggfpNTGQ6BPtux6NE1lVGNeeUOnoxJ+o9UkT3MPEvLSzwd89HR2+1y6P4S8tsG8A1T+ZD+OvozevImNJGknyt619R2mjf1GydE/YWMzUia3YNK61GYKGZnZ6OrbBY6VNqcSdyxt8VKdOOyGvOA9jWIkHewwU2470fGFk1oSfsxEFfg3vTnb9Ccs2Nmda+CVuSzvFIu8VyOFZMqI7tHwIyQwMIf3TVeT8EQSSf6XCUzvW+eRkxmOhrzTW+OQv+4U/flGoHptquMPY3eqligpn+EZ5k8OLg2HEHVaGGKhhXXiurIOH6kCOfGXy0GRxIEIkYhxR07oGH6TFp/cmDwEeB5A+/OQ7bfyZKL7wPddH8Ll5WGXkxfj8vDNXHy8mWn97rfCILjnAGeF0+KYHJdOBMDiCTIbPQ/kYfT84KCKINeofU3XpTa1GY7PuYrgyvNQoTkA695kmp20xbyE9R4f9F9qgoTG4Ag2NFw5iAni0eSfSMOzLobsiNeBXTkAz9S0MPulwp+xkKKhfJTPPYhkIb5DorRI2SO2UFBjHjlU2e7dbaZpkrRzT/8xK2wLVdLJSJ2VUwRocV/QDITU7RnlJ9y5eKVflUioWoSILO5XI5FgkulC6D0k/RcGLT x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR21MB0798.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(82950400001)(76116006)(4326008)(316002)(52536014)(186003)(66476007)(8936002)(82960400001)(8676002)(66446008)(110136005)(54906003)(66556008)(5660300002)(66946007)(64756008)(166002)(55016002)(9686003)(122000001)(7696005)(2906002)(83380400001)(71200400001)(38100700002)(8990500004)(33656002)(53546011)(10290500003)(86362001)(478600001)(21615005)(966005)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CkXmGOxp2jTOhN1wuA22yINFwCY4e7suagJqgE3TmrcAhp4Chq9irbzQOndT?= =?us-ascii?Q?FcIE0lM6xeX8zY4Wjgj99EQ0F8k3hGeUabEYeZCwfe+HTp/ch0QQhQ+UscQJ?= =?us-ascii?Q?Kh5TML4qH+TJH+zQKflBsupfw6IfVQG88w7cuIyGNz7NuNbFgdHWaqwUFfRV?= =?us-ascii?Q?Xyjn8x56bx0szbIkXmIVCl65W2+NsOzX2H+h/Ic2WBloYO6roKToGKtBnSLU?= =?us-ascii?Q?eVwcwgxU7KxaOpQ3NjnH7F2HqRAAHi7UoD5X7G0Bu7MMgflI0XvHhJ0Dfx9n?= =?us-ascii?Q?ZWMFVQLhD4dsZ9f3pBUSrXiZfHFgeTrYUo2rt/7kmFOqptt6TEO3O6f8EX9M?= =?us-ascii?Q?VHdHLsNqvebzDwWn9BLmg28zQU+4D1hR/CStl5NOGuo43akeYmX9gffFOxtE?= =?us-ascii?Q?62kSBmL2e9wOQLdZJQ5jw8IUwDbsdDqOpmy6N9pVhbT8KjaXIJ0HCSoAmqJ6?= =?us-ascii?Q?ZcZup8PlnKFElQkcGEiMfSLj06yeIu4ZgLUBAVZzfqAz5oHGuMVfGi5gKRDv?= =?us-ascii?Q?cxn7o/tn6V/+i5JNw5LEcyVL/Sr0mFv6psMZaSMoI1G215ufWA1xtw0D1jey?= =?us-ascii?Q?vrpVoM4Ek96zswcM7QdsNWw9Dl2N+uDchZ2DHKmlCeZAk9ImDt2i/b47juep?= =?us-ascii?Q?hDGSoK021Ofo+HDVX38CMURmr1DSZGsEMz4QRf8K5+HRwps6yOqP4dAlWI9h?= =?us-ascii?Q?MrgrRBveANK3hU51lv9+VRalzWpdOCsZtN+Q/IsBXv00Gg9W0FqlxmqMTlkG?= =?us-ascii?Q?u/T5j9PekWW9xGBrX47sX290TROmRoJ+al6e75fD0dXhBMLXhIaNe1UwMmnp?= =?us-ascii?Q?a5c+hTwsR7+k9jOXa6mpq1nsjHJuOPyDyC4AjieqlqrPTFLSUi5DZ6NFgW0/?= =?us-ascii?Q?0JqGGHn4WzfBkkGMXpOZ+nAi+1ZkE+IyG38YdHVgtxmXx+1u5DQuXVsCkg15?= =?us-ascii?Q?jxz/dfOJlFIrdPw9PE3uXXKUxUSjPqZxp3qj5PqA?= x-ms-exchange-antispam-messagedata-1: pWEdWFy6WyAVPCdkm0c46+xDt/0tvbezApslOMtm11Ec+MC23oaA5JnGX3lz85akkcahNfCtsDO4ndlt6ysnS+ybLHKjsX9jlN35HiN2V6yAfsupOUZcE+m+w/hsgNyHaip7s6eWMQ3W4CbAN3qj5ZiPu0O8FwnPk0ApUkyNcBgyX+KQuoHrvu4iiQW/zSu95KdyhqnEi3wtgTzUvhDmnrNtOwwp1fz3E7VXg6fE+8RqaDLdsNxqS6S36Moi8fAeuHX9MZBmzdqhLhasp/dVoh6rQq2Rs3x5NCA1QMfmUk+x5PxYamfQuTfcHV5IZzve6yVmUSyhW+9gBiuNvPHm3lTh67MogvU5FoLKCS80YqzNmcwWwZBPNdFXwsLC55SQpa9MDcrFbv8G9CXxT5ZpRMD6 x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR21MB0798.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 909ff151-9c28-449e-fb85-08d90c088d06 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2021 18:48:31.3903 (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: qyT0vVqLtd+Wwc8qAuGL0u3qloJHsuPPl316LdpETEnPnQ7yz35mm/RCSnLSCWTYvI7sC5fXuY6h+BzwyCR8Ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR21MB1906 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, HTTPS_HTTP_MISMATCH, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2021 18:48:35 -0000 Is the format produced by create_gcov and expected by GCC under -fauto-rpof= ile documented somewhere? How is it different from .gcda used in FDO, e.g.,= as described here: http://src.gnu-darwin.org/src/contrib/gcc/gcov-io.h.htm= l? My input data is different from perf.data and I'd like to write a tool that= produces the format needed for AutoFDO. I would prefer that AutoFDO is not removed from GCC and it would be helpful= if create_gcov were restored in google/autofdo. I checked out a revision b= efore the recent merge and tried it on a simple example and it seems to wor= k. I'm also interested in contributing improvements for AutoFDO so will try to= investigate https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D71672 and https= ://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D81379 Thanks, Eugene From: Xinliang David Li Sent: Friday, April 23, 2021 9:36 AM To: Richard Biener Cc: Jan Hubicka ; gcc@gcc.gnu.org; Eugene Rozenfeld Subject: [EXTERNAL] Re: State of AutoFDO in GCC On Fri, Apr 23, 2021 at 12:00 AM Richard Biener > wrote: On Fri, Apr 23, 2021 at 7:28 AM Xinliang David Li via Gcc > wrote: > > Hi, the create_gcov tool was probably removed with the assumption that it > was only used with Google GCC branch, but it is actually used with GCC > trunk as well. > > Given that, the tool will be restored in the github repo. It seems to bui= ld > and work fine with the regression test. > > The tool may ust work as it is right now, but there is no guarantee it > won't break in the future unless someone in the GCC community tries to > maintain it. I think if we want to keep the feature it makes sense to provide create_gco= v functionality either directly from perf (input data producer) or from gcc (data consumer). Of course I have no idea about its complexity, license or implementation language ... Right. What it takes is a perf data (can be text format) parser to produce = the format GCC needs, but someone in the community needs to take the lead. = It should not involve too much effort. David Having the tool third-party makes keeping the whole chain working more difficult. Richard. > Thanks, > > David > > On Thu, Apr 22, 2021 at 3:29 PM Jan Hubicka > wrote: > > > > On 4/22/21 9:58 PM, Eugene Rozenfeld via Gcc wrote: > > > > GCC documentation for AutoFDO points to create_gcov tool that conve= rts > > perf.data file into gcov format that can be consumed by gcc with > > -fauto-profile (https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.htm= l, > > https://gcc.gnu.org/wiki/AutoFDO/Tutorial). > > > > > > > > I noticed that the source code for create_gcov has been deleted fro= m > > https://github.com/google/autofdo on April 7. I asked about that change > > in that repo and got the following reply: > > > > > > > > https://github.com/google/autofdo/pull/107#issuecomment-819108738 > > > > > > > > "Actually we didn't use create_gcov and havn't updated create_gcov = for > > years, and we also didn't have enough tests to guarantee it works (It w= as > > gcc-4.8 when we used and verified create_gcov). If you need it, it is > > welcomed to update create_gcov and add it to the respository." > > > > > > > > Does this mean that AutoFDO is currently dead in gcc? > > > > > > Hello. > > > > > > Yes. I know that even basic test cases have been broken for years in = the > > GCC. > > > It's new to me that create_gcov was removed. > > > > > > I tend to send patch to GCC that will remove AutoFDO from GCC. > > > I known Bin spent some time working on AutoFDO, has he came up to > > something? > > > > The GCC side of auto-FDO is not that hard. We have most of > > infrastructure in place, but stopping point for me was always difficult= y > > to get gcov-tool working. If some maintainer steps up, I think I can > > fix GCC side. > > > > I am bit unsure how important feature it is - we have FDO that works > > quite well for most users but I know there are some users of the LLVM > > implementation and there is potential to tie this with other hardware > > events to asist i.e. if conversion (where one wants to know how well CP= U > > predicts the jump rather than just the jump probability) which I always > > found potentially interesting. > > > > Honza > > > > > > Martin > > > > > > > > > > > Thanks, > > > > > > > > Eugene > > > > > > > > >