From patchwork Fri Mar 28 12:19:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 14031879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54DDEC3600C for ; Fri, 28 Mar 2025 12:20:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.930544.1333153 (Exim 4.92) (envelope-from ) id 1ty8gJ-0006Cc-HT; Fri, 28 Mar 2025 12:19:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 930544.1333153; Fri, 28 Mar 2025 12:19:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ty8gJ-0006CV-CX; Fri, 28 Mar 2025 12:19:27 +0000 Received: by outflank-mailman (input) for mailman id 930544; Fri, 28 Mar 2025 12:19:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ty8gH-0006CK-FS for xen-devel@lists.xenproject.org; Fri, 28 Mar 2025 12:19:25 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062d.outbound.protection.outlook.com [2a01:111:f403:2614::62d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e01d2aac-0bce-11f0-9ffa-bf95429c2676; Fri, 28 Mar 2025 13:19:20 +0100 (CET) Received: from GV1PR03MB10456.eurprd03.prod.outlook.com (2603:10a6:150:16a::21) by AM9PR03MB7313.eurprd03.prod.outlook.com (2603:10a6:20b:273::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.46; Fri, 28 Mar 2025 12:19:18 +0000 Received: from GV1PR03MB10456.eurprd03.prod.outlook.com ([fe80::a41e:5aa8:e298:757e]) by GV1PR03MB10456.eurprd03.prod.outlook.com ([fe80::a41e:5aa8:e298:757e%4]) with mapi id 15.20.8534.043; Fri, 28 Mar 2025 12:19:18 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e01d2aac-0bce-11f0-9ffa-bf95429c2676 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OgeOT5+k4fZL2bo7EMZAAGwXoORtRticJVlOT9dVjUiCaDQHlyjwUflljHFQhdnP3qFc/tRJkhFwkshn3oYUUQyCljk0q8yMwJ0qHC7Deoos/GmZPolKInq3iR67LAEh3wv5/F0tvJWVoVvm0Gl5BsBuRB/eAhC/VIbuj+CbmWUhyy3Z8fmM0uu7X4xXIZdVxU0xeL14QxM5ko9xBFMvy4q8K0AvTjazvhjT1AyReAqjtadlIEu/c9MjvudcXBiqe1Q73sI+zNVtT63dIVmbewxUu3qQh6pIsz2qky2k2+JybKtWtwG3ldAXz6f3uBVbaRO36fQLlZAdgQLIZD0JvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=3DRzRlJHjWJGlq7RFK3uImRpdrIpG2J7us3Oyxd8+Y4=; b=v1SQddNMGKeqm5uezPaWpCLAVPWCq7JK9u12Mtv7eBs+PAvdhT7GgJsn0kxo+fpJyYPTrYb920dZTHRdhz3eoib7lQJpaxf62BfV1CuKBuHNUxAZkTOsJfVayNwHw8kuf4ODDqTrnW77Pc3IW1hqRxXHCriNo5uV+PJZ6FlV0279CgK5nmRmOL+Y7YkHYx+QGnzzLiLBEpYq+jTEJBVeReKXFGzpCGqBnDm+84j8po2Cn02xhX9XVszRVYUZzQT0Ph7/mkR18kCrCmD2Dq0se7jVGPmTPX3KrE6iNiiK/rYO1A5keqlLjTZvSHaVXimxfUdV4HQ31cQ4H4zT+9uSFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3DRzRlJHjWJGlq7RFK3uImRpdrIpG2J7us3Oyxd8+Y4=; b=WgGhJRzzdYWeYsi83pqwHzEs22nqWyxjWjQjDYkRwF27WsGZ1nVJtcHsCpgnB0tjGhwF+62ikpxBBVONFG7qPeaXMWm4heauv6b9r1gxcmoCIyq5zpOZ7F5nDnixFxzvGPGV8vWJbzjjRyu9EKO0q0FaBnpe4Y+HD86Otf2snBwe07GulpUULraFsgHU9YBa1YccU+Lhohq646BB59SAMYXnSlkRNIfanYF9M1LIGsO6cJ+f4Pn/tQPCvpjuir4xcu6OtfCdfeWLk8nRuROPvbM2dHjggE+Gl2jfbTXEFlhWpU407aHaW5I1IhTPo/rue9BkpsDWit3NegkAW4GtOQ== From: Volodymyr Babchuk To: "xen-devel@lists.xenproject.org" CC: Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v2 0/3] Enable MC/DC support for GCOV Thread-Topic: [PATCH v2 0/3] Enable MC/DC support for GCOV Thread-Index: AQHbn9ugAFJGRLwMF0+KrTTxxLbOJw== Date: Fri, 28 Mar 2025 12:19:17 +0000 Message-ID: <20250328121902.2134020-1-volodymyr_babchuk@epam.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.48.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: GV1PR03MB10456:EE_|AM9PR03MB7313:EE_ x-ms-office365-filtering-correlation-id: 236b569d-1d04-417e-a583-08dd6df2c32a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?Xe3xCltbT0UIJkb1lxV0lT7I0JXV6QW?= =?utf-8?q?qzNOr8E8ysk4fTOcgkjYmYQj8dtUR0vCqKzV0PBJ0Lz8+ugaWFcGFetW40W1ywTFW?= =?utf-8?q?1hsl4ef+N0snl2qKMrNwKc7LoKOaFCeb2cAS+T2IeFv/qokA8ec/sNDbRByLFaplm?= =?utf-8?q?TwrFBXi2tWu3EbTZz0exRG37N3X3swxeuIH7CMJrrCUv2bvfcei0vlguO6/p3hTjf?= =?utf-8?q?poPj6V0YBVQ6Yuq+nE1F0sKLlP3pT+emeDcwTIeGcdirjXEKyswzL1Ga4cmjw5cl2?= =?utf-8?q?K4Z79XkIbZ1OfzJWWtViTT1jYHzmbkQ6379J5r3ztLe4Tkn+DzoGK+p4f1B0nvMRi?= =?utf-8?q?VWA3f+2aT6fyMOhZ3OGJfZrZ55gobH5syyX+oQb2Hy5WJf6l/vEEQuWeTzdsDHzYb?= =?utf-8?q?0RHWGOX7/EgcGmC/4KFeV5rAWpx8A88MVlDQ7E1sZBCt0DHOcJ/0fOAyoUMqZYdZX?= =?utf-8?q?B7UaTm5pGMO8HHoFdW61iLIYBWMqHsNkaD8hP8PesUE9G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shr01WGbe77ExqJyr+N5?= =?utf-8?q?Xwx1Knc2MUR?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR03MB10456.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?cHkg+uUuUhK9jLnwgt/rgmBIq8uA?= =?utf-8?q?alm7566OtSLvItZnbX/1UeB6PD6GO4tJnrY5vdvDbIgmqJFs23ljq6RTd6M4UBgSs?= =?utf-8?q?s2vQNTZ8PTKxkwlSuWYJLYwZRsEFNjYWH0jqTpGP8rsF/WoVuH2vE3UgtMu3CWSsw?= =?utf-8?q?vS3bgHldHy/RtIgIkGAuMMWIvo/HYAoCbbxUHb6nquAa9tDCkWu8cv1v7NmVN0dC9?= =?utf-8?q?qMq+d5jQTN1TqO2vb7/X77QFc6f9RRpoaGO+rpT6jLC5T1qvKXeObGgCDnXqzRPDT?= =?utf-8?q?SFM+eWu3kIC6B1GIVi3z5DwAL/lgICdyxFpZ1DoZdBaw8m1fvPksKrTXJoNPWcVy8?= =?utf-8?q?KXC3/cBHjv1Lk8pO8oV+MF4xJrfjTJWRLaosdjARxvTQW78TRdmiW95lac+Z/iWPH?= =?utf-8?q?qxjSFnZPuMDH3sItpf3+otiG0fXwYQcH6GbtKSni0FhC7xK+rJD0aDmonVyyLd3TR?= =?utf-8?q?nETYKoFrDLmqXwo659jT7+0eHwd+btkhDiTwrAC3uPWb47AA79DyKDk5mkAEbwcY0?= =?utf-8?q?vZ/TOLrpgi/kXP5Q+4SY4VuOlMBodSRpRG4yM/PGoQB6LVaYG1XLZPFuwEovpq3pg?= =?utf-8?q?z8zFVlTjjSHz/RbrZXRaA/RAnGOir9oJ0Eb2sOcK5koUF+xXpmT+YUtVix8fRawLC?= =?utf-8?q?F1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q?zRapcSrOJaPpuiWNaXj2a7VjHzAYCOpf+w=3D=3D?= Content-ID: <027F2446440806408E5A50F1AE9188F0@eurprd03.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: GV1PR03MB10456.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 236b569d-1d04-417e-a583-08dd6df2c32a X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2025 12:19:17.9724 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UpW9/m7a4G1J7XtcPQInq7TzfSAyx4DY0YYN4MyKVeuAz8w/a4USc/pNA7RwxWnqoklKNRG8zmhJF7E3cbQIZt9hAEyG9QYXn6LkeZE6CwU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB7313 This series enables MC/DC for Xen when building with GCC. Condition coverage, also known as MC/DC (modified condition/decision coverage) is a coverage metric that tracks separate outcomes in boolean expressions. This metric is used in critical software components, so it natural to collect it for Xen. Second patch in the series ("xen: x86: irq: use do-while loop in create_irq()") deals with unexpected GCC issue. As was discussed in the previous version, I changed "for" loop to "do {} while". This series support only GCC, although Clang, starting with clang 18. supports similar feature. But Clang 18 uses raw profiling format version 10, while Xen supports only version 4, and there are quite substantial changes in headers and structures, so adding new version format is non-trivial. Also, Xen built for aarch64 with clang 19.1.17 and code coverage enabled, completely hangs up during boot, so there is clearly more work required. Another problem with clang-based MC/DC support is that it has multiple issues which will prevent use it in a meaningfull way: https://github.com/llvm/llvm-project/issues?q=is%3Aissue%20state%3Aopen%20MC%2FDC But at least we can have MC/DC with GCOV. Changes in v2: - Check for gcc 14, not gcc 14.1 - Reworked irq.c patch Volodymyr Babchuk (3): xen: gcov: add support for gcc 14 xen: x86: irq: use do-while loop in create_irq() xen: debug: gcov: add condition coverage support xen/Kconfig.debug | 9 +++++++++ xen/Rules.mk | 7 +++++++ xen/arch/x86/irq.c | 10 +++++++--- xen/common/coverage/gcc_4_7.c | 4 +++- xen/common/coverage/gcov_base.c | 5 +++++ 5 files changed, 31 insertions(+), 4 deletions(-)