Message ID | 20250401011744.2267367-4-volodymyr_babchuk@epam.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> 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 06591C3600C for <xen-devel@archiver.kernel.org>; Tue, 1 Apr 2025 01:18:18 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.933349.1335346 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1tzQGN-0007To-Nz; Tue, 01 Apr 2025 01:17:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 933349.1335346; Tue, 01 Apr 2025 01:17:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1tzQGN-0007Tb-LD; Tue, 01 Apr 2025 01:17:59 +0000 Received: by outflank-mailman (input) for mailman id 933349; Tue, 01 Apr 2025 01:17:58 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <SRS0=gZL1=WT=epam.com=Volodymyr_Babchuk@srs-se1.protection.inumbo.net>) id 1tzQGM-0006nG-Ce for xen-devel@lists.xenproject.org; Tue, 01 Apr 2025 01:17:58 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20630.outbound.protection.outlook.com [2a01:111:f403:2607::630]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 245813c6-0e97-11f0-9ea7-5ba50f476ded; Tue, 01 Apr 2025 03:17:56 +0200 (CEST) Received: from GV1PR03MB10456.eurprd03.prod.outlook.com (2603:10a6:150:16a::21) by PA4PR03MB6703.eurprd03.prod.outlook.com (2603:10a6:102:ec::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.46; Tue, 1 Apr 2025 01:17:52 +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; Tue, 1 Apr 2025 01:17:52 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Inumbo-ID: 245813c6-0e97-11f0-9ea7-5ba50f476ded ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Oj+tm7K88H1MPomCItq+65O8sldxVITws5ECAYwPaFuFd8OMpYF6sTrLRHxaBQzcwoRO6o01Bep1Dd9K+PLR2DsjXewyw/JT2DO88KbfTHr9uNvBHmxjssO4Wmg6odxAjRFKbZuFDm4BEeFF4EB2w8o7eBc3uljOCSwGTERvURgjePz/whmkrLIMQ5UNUrh7dd5fxp4WGh4Nzn82dbzI5U5jQn5q8C8cfKQs7+Ru32RLt3UKFNonNzu9sAx+v42VPA7r/QWKyez2TOaxSLiB9a1hp+cFEpw8cMR5boi6iF2AMPjjMezK+Pe9iWWrOxF9SS2QfvHY2iujJpcf1i6cVg== 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=HGPtfu1XySmVw/zK9unEnF48Uef93WdT2NZnuvi0GjM=; b=e8K2eMp3aRnoPoUtuAnQxa2oI+MtKt7CQW9vMI5/JdBXLSKw3MFvmrLn/TZk7nmczmKK45rElcmtP/vIXVlc9wHnyWGk6Dak1KmcAwQYbhKNwpIwYRqeQTFkeb2DCMFUnUCuqLSokXnIqSvcOI8UamgdhSb/zZMkHrKJ9KMRMYq4IKsNSvrpLxqbvLpnz0EodwIKorx1tXoxvFAt28rBak4dk9DdNJAy6gqsOCv7QNJ26ucgh0zQY5mWsV9Dvr5WU9IK74jlc2WpcQjsls3rqFxRyUR2XafV6M0A2d9i0aUHImxVQzUCnxdCKn/xC6qh8HuK9hqych/VFEOktOrvWA== 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=HGPtfu1XySmVw/zK9unEnF48Uef93WdT2NZnuvi0GjM=; b=QIyQF/3BBmLCCUbx7fSOsupVbRyKEukdcYmFNy7RLNSoxvgoRWNH+F8NnF0h1K6kJV8qXNmiwKt6EdGo1cbKUsyFV/yfT60k2BsYhCnTY6rpncpRr5MPDblFEl+WJKA+xT2l+k9Usvb2VWcoTgI0R6f0oG3g4u5wajGx5VqlGQVM5ksxtUQkBZbCP/qQBI6sDcgJw6TsG0JIu/49Q9O+ZtluurKxQdp6jn1BPNBjhv7ksITzBmigEE4kaddErnA43oyPK+1/OP3oVMnNyfkn5WJLzX5gu5KJsMOgg61+IBD5L10OjyZQPiGrx8JDEaeU6c1qFtRup9o8e1Dwrjnjgg== From: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org> CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Anthony PERARD <anthony.perard@vates.tech>, Michal Orzel <michal.orzel@amd.com>, Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>, =?iso-8859-1?q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>, Stefano Stabellini <sstabellini@kernel.org> Subject: [PATCH v3 3/3] xen: debug: gcov: add condition coverage support Thread-Topic: [PATCH v3 3/3] xen: debug: gcov: add condition coverage support Thread-Index: AQHboqPjQYlXeZrAE0u+zEMqLR0ZhQ== Date: Tue, 1 Apr 2025 01:17:51 +0000 Message-ID: <20250401011744.2267367-4-volodymyr_babchuk@epam.com> References: <20250401011744.2267367-1-volodymyr_babchuk@epam.com> In-Reply-To: <20250401011744.2267367-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_|PA4PR03MB6703:EE_ x-ms-office365-filtering-correlation-id: 399a3fc3-8d76-4b02-68f6-08dd70bb064b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?Jg/adk7Pyci12INTJhjq7QhoMv?= =?iso-8859-1?q?O4U8qyLLFmtl62heHCbflCPXprux4npvCj3qXUGEN33w7oH8i/p3lt8i4Max?= =?iso-8859-1?q?qm81eUBv8S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EBwwnPPLAsQsD/3pDI/j8lny0g6kpaUl?= =?iso-8859-1?q?eQ2UXbvtFuKgYMH8T6d9udCfVpWnrgz7hlhQ/2V/UXAYX2InTCf/UKLBbINz?= =?iso-8859-1?q?xb9veyCwUz/I8NVsGkoOn9lBSvUTSKC38E5AcNJ3D3Szs5J4WKGmkJLcgYT7?= =?iso-8859-1?q?j/vqhePrhh+KFsz2XlGFM1QvBHgdWNbHRXcuDjUZK3Xdj2XUtCYiQsQvIL42?= =?iso-8859-1?q?lQtCWgRWERxHbawq0ys4+z8F4PgNTfI4DH528XqLPuoZpZ/cPo+NGbmjRfhx?= =?iso-8859-1?q?5/bqVjIM0FOhV6Wl3Z58CColRSEcCoPn8DcN/DmOcRZ19SMm71UKQLma1lhS?= =?iso-8859-1?q?quEDxl+2lI/h6bMemLKjBHHmdI4pAD1z4x9w4b2CFAaPxQ4ipCcuBXm+QT2U?= =?iso-8859-1?q?OlJm2xlFqTzKiU5QU0prQIiLbjBLQjU423H32IH2IyKGZViYSupNSwoDSWUi?= =?iso-8859-1?q?TPzlk0WpKUXCQejo459XThhzviqGNQ5gDpjqB+AIcHemXHhaLzBbHe5UT5Sq?= =?iso-8859-1?q?tGp/5r?= 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)(366016)(376014)(1800799024)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?hMD6/aby3vH4GXE36eywehf?= =?iso-8859-1?q?K2XS9uI4P1nw7FuHiB1ZMU6SwBuMm34rosLysamHclTW6Ot02r0lSJUjjF9N?= =?iso-8859-1?q?/Q0LMD+Zm07737cIdxktu4SYmkjY5X70aXG+QU2ogB4DuBwTo6wh6T6zRIis?= =?iso-8859-1?q?JDpxJ+y9W238vqhOinPF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xTZ/29xej?= =?iso-8859-1?q?1PYzg3fPvS1/DC4Xob8KLcZjj7TArTYf7thZt/b5G2jT4kYWHZCNYrD4Zj+F?= =?iso-8859-1?q?SzVm66kqR6qMoMqe3NMX76BvcD60KnYmzuJcWV7XxN1CVPRIbQInAPEsRzj4?= =?iso-8859-1?q?rZ0IeR3eXIh9zFfXgsX+Zq3g4YbeMqlPfzB2rJBaSYAXdg2oWICAVXkU/I0Z?= =?iso-8859-1?q?InME7hm7xcvEDk/0Bu5PCR9MqHenDgFU/YCwZpxeKzJfw6YlrWISXujGdlfW?= =?iso-8859-1?q?0VgFIq+FKauS70IhG6odjVSN2Vo1EW1x5zrQJu87o42EiRl/6HNFO7SYIIlJ?= =?iso-8859-1?q?iX0GSfH4NInNPvrXdVsdGfRhScMSk8Rhs+4u3E1wNJswZ04VyodwavlBe9U6?= =?iso-8859-1?q?zwo8YWon3yAWvNrbsk2e16IeKt6oCy6/faMXJVSNBKwkoaEtlOEEFmaGHrIG?= =?iso-8859-1?q?fkfzU0hhzBqD4cfRBeD5aJjFH1iVlxxB/iU/OUSfcZqU9OIj2Z/+8W5/x/q9?= =?iso-8859-1?q?IsBPwEKXzhWOwfcRg8qvfZs7ImK47ArB72jFEXk1IhR00aiA0srN1IH+rNpe?= =?iso-8859-1?q?1GUc+G2TFMtXb9SLsAU6qH+w/CrKJ/DvG607Pvw=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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: 399a3fc3-8d76-4b02-68f6-08dd70bb064b X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2025 01:17:51.9544 (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: T7+UJ9blVH+nnhdI5iEPRDZCA9vRPblO5Gjod5i2A8fMYI+rg4NXqSNdfswlmS21fV/GDNtAmorupBKIBoq5eeymKCeRZ/g5kca8iKM4zFA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB6703 |
Series |
Enable MC/DC support for GCC/GCOV
|
expand
|
diff --git a/xen/Kconfig b/xen/Kconfig index 2128f0ccfc..2bdebfc808 100644 --- a/xen/Kconfig +++ b/xen/Kconfig @@ -41,6 +41,11 @@ config CC_SPLIT_SECTIONS config CC_HAS_UBSAN def_bool $(cc-option,-fsanitize=undefined) +# Compiler supports -fcondition-coverage aka MC/DC +config CC_HAS_MCDC + def_bool $(cc-option,-fcondition-coverage) + + # Set code alignment. # # Allow setting on a boolean basis, and then convert such selection to an diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index f7cc5ffaab..f89cbd823b 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -44,6 +44,15 @@ config COVERAGE If unsure, say N here. +config CONDITION_COVERAGE + bool "Condition coverage support" + depends on COVERAGE && CC_HAS_MCDC + help + Enable condition coverage support. Used for collecting MC/DC + (Modified Condition/Decision Coverage) metrics. + + If unsure, say N here. + config DEBUG_LOCK_PROFILE bool "Lock Profiling" select DEBUG_LOCKS diff --git a/xen/Rules.mk b/xen/Rules.mk index d759cccee3..0a2933cffa 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -138,6 +138,9 @@ ifeq ($(CONFIG_CC_IS_CLANG),y) COV_FLAGS := -fprofile-instr-generate -fcoverage-mapping else COV_FLAGS := -fprofile-arcs -ftest-coverage +ifeq ($(CONFIG_CONDITION_COVERAGE),y) + COV_FLAGS += -fcondition-coverage +endif endif # Reset COV_FLAGS in cases where an objects has another one as prerequisite
Condition coverage, also known as MC/DC (modified condition/decision coverage) is a coverage metric that tracks separate outcomes in boolean expressions. This patch adds CONFIG_CONDITION_COVERAGE option to enable MC/DC for GCC. Clang is not supported right now. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> --- Changes in v3: - Introduced CC_HAS_MCDC that checks if compiler supports required feature Changes in v2: - Move gcc version check from .c file to Rules.mk (I can't find an easy way to check GCC version at Kconfig level) - Check for gcc 14, not gcc 14.1 --- xen/Kconfig | 5 +++++ xen/Kconfig.debug | 9 +++++++++ xen/Rules.mk | 3 +++ 3 files changed, 17 insertions(+)