]> xenbits.xensource.com Git - xen.git/commit
xen: debug: gcov: add condition coverage support
authorVolodymyr Babchuk <volodymyr_babchuk@epam.com>
Tue, 22 Apr 2025 23:29:23 +0000 (16:29 -0700)
committerStefano Stabellini <stefano.stabellini@amd.com>
Tue, 22 Apr 2025 23:29:23 +0000 (16:29 -0700)
commit920cc4e65e9ea15676c2326656674c9e212e55fe
treed9433de56d755007812d08de9c6c2e10470924de
parent934fcfb17dbac059bfaabf0dc4277e32176a043e
xen: debug: gcov: add condition coverage support

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 because Xen can't emit version
10 of LLVM profile data, where MC/DC support was added.

Also, use the opportunity to convert COV_FLAGS to cov-cflags-y, which
reduces amount of ifeqs in Rules.mk. Otherwise this patch had to add
another nesting level with "ifeq ($(CONFIG_CONDITION_COVERAGE),y)".

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/Kconfig
xen/Kconfig.debug
xen/Rules.mk