From: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
To: Anthony PERARD <anthony.perard@vates.tech>
Cc: "Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 3/3] xen: debug: gcov: add condition coverage support
Date: Mon, 7 Apr 2025 10:37:02 +0000 [thread overview]
Message-ID: <878qocfeb6.fsf@epam.com> (raw)
In-Reply-To: <Z_Oha7JXI2vf4uXo@l14> (Anthony PERARD's message of "Mon, 07 Apr 2025 09:57:00 +0000")
Hi Anthony,
"Anthony PERARD" <anthony.perard@vates.tech> writes:
> On Sat, Apr 05, 2025 at 03:30:49AM +0000, Volodymyr Babchuk wrote:
>> --- a/xen/Rules.mk
>> +++ b/xen/Rules.mk
>> @@ -133,18 +133,19 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y += -DINIT_SECTIONS
>>
>> non-init-objects = $(filter-out %.init.o, $(obj-y) $(obj-bin-y) $(extra-y))
>>
>> -ifeq ($(CONFIG_COVERAGE),y)
>
> This removes an "ifeq ()", so you probably need to remove and "endif"
> somewhere else, which doesn't appear in this snippet.
Yes, I'm sorry, it just didn't got into the snippet. I wanted to discuss
approach only, so this is not the final version.
>> ifeq ($(CONFIG_CC_IS_CLANG),y)
>> - COV_FLAGS := -fprofile-instr-generate -fcoverage-mapping
>> + cov-flags-$(CONFIG_COVERAGE) := -fprofile-instr-generate -fcoverage-mapping
>
> If you do this assignment like that, it would be better to make sure
> $(cov-flags-y) is initialised properly, that is have a:
>
> cov-flags-y :=
>
> before the first conditional assignment, then have all conditional
> assignment be +=.
Sure.
>
>> else
>> - COV_FLAGS := -fprofile-arcs -ftest-coverage
>> + cov-flags-$(CONFIG_COVERAGE) := -fprofile-arcs -ftest-coverage
>> + cov-flags-$(CONFIG_CONDITION_COVERAGE) += -fcondition-coverage
>
> What happen if CONFIG_CONDITION_COVERAGE=y but CONFIG_COVERAGE=n ?
Kconfig ensures that this is impossible:
config CONDITION_COVERAGE
bool "Condition coverage support"
depends on COVERAGE && CC_HAS_MCDC
I believe, this is enough, and we don't need a separate check on
Makefile level.
--
WBR, Volodymyr
next prev parent reply other threads:[~2025-04-07 10:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 1:17 [PATCH v3 0/3] Enable MC/DC support for GCC/GCOV Volodymyr Babchuk
2025-04-01 1:17 ` [PATCH v3 3/3] xen: debug: gcov: add condition coverage support Volodymyr Babchuk
2025-04-03 7:30 ` Jan Beulich
2025-04-03 13:15 ` Anthony PERARD
2025-04-03 14:18 ` Jan Beulich
2025-04-05 3:30 ` Volodymyr Babchuk
2025-04-07 7:19 ` Jan Beulich
2025-04-07 9:57 ` Anthony PERARD
2025-04-07 10:37 ` Volodymyr Babchuk [this message]
2025-04-01 1:17 ` [PATCH v3 2/3] xen: x86: irq: use do-while loop in create_irq() Volodymyr Babchuk
2025-04-01 6:33 ` Jan Beulich
2025-04-01 1:17 ` [PATCH v3 1/3] xen: gcov: add support for gcc 14 Volodymyr Babchuk
2025-04-01 6:27 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qocfeb6.fsf@epam.com \
--to=volodymyr_babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.