From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2111.outbound.protection.outlook.com [40.107.100.111]) by sourceware.org (Postfix) with ESMTPS id 0630E3858D39 for ; Fri, 30 Jun 2023 05:27:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0630E3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=microsoft.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microsoft.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JVD23JCKSMzwTx7t4kT5Iy8Rxia4RpY8wN5fhtjwJFR7xthp+TLdtr7nOiFdcf2qcsr+let5Z1GTni1wO28Mh7LDdtUqaHeux0xJ1EMlUCQqLNCoM7tbc0SI9JBKjSOmjTepDL53bEcuEUU5KmzxsJ4YNT+BK4+DIpjxI5q6+zu1D1ieXMRjJVJ+qqUjF13a0EiqrG6Knb9ey95tNeF76QSoV42VlanKxbQcWewN1ejfUotoimqHvbntjkd6PF55r2Kolvx6InuMF6OySfByL+31tAeTa25nj7bnAwtsR56JjWKP8UJfip9uZ1NWGs2mamx7E5Sp1xUCT6rE5Izncw== 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=bL4HiUU342U9OvzFkRnlNxK/t8jV+lg4h+KBNWvyTtI=; b=GoloLztBBs3dWiiUiNHL7aQd3C4zdPETMelmCKYk4Whw7uKIRwa1FtTVqsrUG1ObzBVJe0zf7OAdNBtdDYC+/AxQ0Vy2688nDvuo8w2PiaTlgkW1KhUeQ30oBP2q2GHI/dIgUGQ/jqH173mJfzSZkrJQaTvdmlAP6KywsBiFsiZTKTseYYrzXo5xAPO4dpdyV2yOfKABpAdTGZlaJtygmCwBSFW6yS54OyGF49Rp0eGKu480lQ8x3k2BhGdKqkPLJ5BfhyDCZe/nl/E7mgNB+XsfORw8CBEkKywzjfhv6CBCYH9toxAb9T+V1iooxtL8yi64WLAuEGWIbt3Ua+JG2g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bL4HiUU342U9OvzFkRnlNxK/t8jV+lg4h+KBNWvyTtI=; b=eGVduIacUEmt4uqkxQBd2aoftljQCaW37dp3/SlUeakS9co8zkXZJUWWodK97wQc6hCsrW2QrjAkBqn/3JvNHe8L0AcS3LBn5BQlvHjolhk1NB2D6SxzfOAYYcq7WbcZkuNNRYlpVtAH3IFLI12/unvkCW/pQbkPToSqBUSD18M= Received: from MN0PR21MB3484.namprd21.prod.outlook.com (2603:10b6:208:3d3::17) by CY5PR21MB3542.namprd21.prod.outlook.com (2603:10b6:930:d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.19; Fri, 30 Jun 2023 05:27:55 +0000 Received: from MN0PR21MB3484.namprd21.prod.outlook.com ([fe80::1b1d:ed69:a0a8:1108]) by MN0PR21MB3484.namprd21.prod.outlook.com ([fe80::1b1d:ed69:a0a8:1108%4]) with mapi id 15.20.6544.002; Fri, 30 Jun 2023 05:27:55 +0000 From: Eugene Rozenfeld To: "gcc-patches@gcc.gnu.org" Subject: [PATCH] Collect both user and kernel events for autofdo tests and autoprofiledbootstrap Thread-Topic: [PATCH] Collect both user and kernel events for autofdo tests and autoprofiledbootstrap Thread-Index: AdmrE3xMzMewW4gGQFm9hrfKsYMxlA== Date: Fri, 30 Jun 2023 05:27:55 +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=e5013283-8bb5-46de-a556-1d47e0344cfb;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=2023-06-30T05:26:13Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR21MB3484:EE_|CY5PR21MB3542:EE_ x-ms-office365-filtering-correlation-id: f088c6bf-98f1-446b-df15-08db792ac1e1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yYLhoCyQAsOfuKCPcpMIkEau1c3t+bD3cgZk7vWNHTZeSW0tixE6iowtOo2Rs//Ijb/Hza13KaCjNT8Rdne0BVgwzZ1/jLxchkYxlRi48nhMds2OqljF4EqbvC1WClEbWll5UcPfuVNrtimBCFm939WRaQgCCdasdIx59St7G1I5fZyZW/cxt8vGWI0RXCyBHKz02TPEoqflcRMx194Zf/T7RzOp2tC3OHLBYkgXNLjD7C0rflWekpzwBqmt1B0h36Mlu7omvukfLMw30AKiKRQN+PKg2JppOPrKG5eDCqZT1mQQQMMbRL7jOaD2z136WUSwnmxHs3XpugaoLL3ub/tDJr+LslNjf7NfDGhA268DFy1IK0ehEDPtet9PYrf+9fNbfXHc+pfR+HS7aTmyCtQEaCwcWUKeYqZTOYgD5B0iz1F+VdRBBv8ZKLpzEoHGsSbA2OiiNTAUji2rkBIWYmVK598rj7GrS4ihHZLkuTHNZ+3TXh2SPixsxCZDFAOTXQkTosSoBIAvlS3vUTFRWlJXI0/udoGgU2ORd9CfNR/2R44KmYP7ssAdOtMJHi111oGKiNEuK07N7BfSDVQZqMiVXOUcblveu0tHkewWzrm6bI0+xHi9Mj1O9GZ76qtDlGdXHj+GHWiIe2XykbOeFu7dnuQPID3XHuTwC5OQlZw= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR21MB3484.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(136003)(39860400002)(346002)(376002)(451199021)(52536014)(2906002)(71200400001)(55016003)(8990500004)(5660300002)(8936002)(41300700001)(316002)(8676002)(66446008)(66946007)(76116006)(66476007)(82960400001)(38100700002)(66556008)(64756008)(478600001)(86362001)(7696005)(10290500003)(33656002)(186003)(6916009)(9686003)(122000001)(82950400001)(83380400001)(38070700005)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gO3QcDXJmcyF8RGu4T5Ahnyn8WPSwYPJk1LSdlmLFPFVdXUNQDYNJ6vjSpM8?= =?us-ascii?Q?XVgtnw+Eny5RBjd9gWA8vElJyu3fWNtJB2snnSy+1qz5POxFNTftQZT7hITP?= =?us-ascii?Q?B5jMNfp/95Oo2Xsd4xjgqPRuRQH3iYOAU1DzffOVd0aLaScmMSPeL5yx9Mkx?= =?us-ascii?Q?+Q21NDscNADWHN7i/ANdxymmHYm6/Z++tubxD0r/Qj2t2DTc8WWR2EYZL4+3?= =?us-ascii?Q?miarfsQRosjT6L7i3wvUUta/SLz4q7YuFTIbK7vgxoI/MTnBYa6au/xeZDjy?= =?us-ascii?Q?0OVHM8Cx8srs2gWlSSdToQ8m8t2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aj?= =?us-ascii?Q?wjwrYsFmhzVjKUlDtWT+Dc+lDCHQt+uG8m9vJZ1pLfsCnBxPkgsD46xS5ROl?= =?us-ascii?Q?pImb904DHdxM1hncWEZJeThvpQHRJTcKn+03b3jSkoNvtr4FZcUh3ipPa1E4?= =?us-ascii?Q?6uXDnbpJB8Ns93n7JNesdrlvP+VG1fwrqUTm0KmdMbDqpQ7F4K+/P7UOZ7nK?= =?us-ascii?Q?acSLdS2CBKGICaUh4PMdNGGZDCZLYKcUmN+MkT8O0l1Flcno1aGvXtADK4Xk?= =?us-ascii?Q?5I+YpS7nPHwL5UOBN6hWmDwClHlJQkRMZjwdJ0Abq2w/stvGED4tRUm9TsVy?= =?us-ascii?Q?UaZZ5WFg7Enl5fLYHEpjbgiO7nP0FZypGaz0+4oDCq+qapP29q/R76xUO1Ji?= =?us-ascii?Q?CUuby58BOzHT3TC03LRy8gD9p2w7uGgZ96WjCmf3aKlMUGRx0fbf7p21NTTN?= =?us-ascii?Q?Sdp+es/0ezEvgQsWxQicx+V7erc7f3+qFKZ3LmPn6GHG?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR21MB3484.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f088c6bf-98f1-446b-df15-08db792ac1e1 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2023 05:27:55.1059 (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: 59PEsUR/HP98XaW7BugR5YOEAxz743SoZZXs1FgOEjbuIWhPzLnptCY3TBIjoUGyyvQpvre9Z4Ofn2mJrPW0CQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR21MB3542 X-Spam-Status: No, score=-10.7 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,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: When we collect just user events for autofdo with lbr we get some events wh= ere 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_g= cov 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 gcc/testsuite/ChangeLog: * lib/target-supports.exp: Collect both kernel and user events for autofdo --- Makefile.in | 2 +- Makefile.tpl | 2 +- gcc/testsuite/lib/target-supports.exp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index f19a9db621e..04307ca561b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -404,7 +404,7 @@ MAKEINFO =3D @MAKEINFO@ EXPECT =3D @EXPECT@ RUNTEST =3D @RUNTEST@ =20 -AUTO_PROFILE =3D gcc-auto-profile -c 10000000 +AUTO_PROFILE =3D gcc-auto-profile --all -c 10000000 =20 # 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 3a5b7ed3c92..d0fe7e2fb77 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -407,7 +407,7 @@ MAKEINFO =3D @MAKEINFO@ EXPECT =3D @EXPECT@ RUNTEST =3D @RUNTEST@ =20 -AUTO_PROFILE =3D gcc-auto-profile -c 10000000 +AUTO_PROFILE =3D gcc-auto-profile --all -c 10000000 =20 # 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/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/targ= et-supports.exp index 4d04df2a709..b16853d76df 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -704,7 +704,7 @@ proc check_effective_target_keeps_null_pointer_checks {= } { # this allows parallelism of 16 and higher of parallel gcc-auto-profile proc profopt-perf-wrapper { } { global srcdir - return "$srcdir/../config/i386/gcc-auto-profile -m8 " + return "$srcdir/../config/i386/gcc-auto-profile --all -m8 " } =20 # Return true if profiling is supported on the target. --=20 2.25.1