[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/3] Enable MC/DC support for GCOV
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Date: Fri, 28 Mar 2025 12:19:17 +0000
- Accept-language: en-US
- 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
- 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-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==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Fri, 28 Mar 2025 12:19:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbn9ugAFJGRLwMF0+KrTTxxLbOJw==
- Thread-topic: [PATCH v2 0/3] Enable MC/DC support for GCOV
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(-)
--
2.48.1
|