|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 3/3] xen: debug: gcov: add condition coverage support
On Fri, Mar 28, 2025 at 12:19:18PM +0000, Volodymyr Babchuk wrote:
> 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@xxxxxxxx>
>
> ---
>
> 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)
It's very easy to do so, our Kconfig already look for GCC's version ;-)
The result isn't used yet in Kconfig, but it is in some C files and
Makefile.
You can simply do:
depends on GCC_VERSION > 140000
(instead of checking for CC_IS_CLANG, because GCC_VERSION would be 0
when clang is used)
But, do you really need to check for gcc's version? Is
-fcondition-coverage mean something different in previous version?
Cann't you actually just check if a feature is present in the CC been
used? It is rare to check for a particular version of a compiler and
instead check if it knows about a flags.
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |