Message ID | 20250327004044.2014048-2-volodymyr_babchuk@epam.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable MC/DC support for GCOV | expand |
On 27.03.2025 01:40, Volodymyr Babchuk wrote: > GCC 14.1 has 9 gcov counters and also can call new merge function > __gcov_merge_ior(), so we need a new stub for it. > > Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> As to the title - what about 14.2.0? Or the soon to appear 14.3.0? I recommend to say just 14. > --- a/xen/common/coverage/gcc_4_7.c > +++ b/xen/common/coverage/gcc_4_7.c > @@ -28,8 +28,10 @@ > #define GCOV_COUNTERS 10 > #elif GCC_VERSION < 100000 > #define GCOV_COUNTERS 9 > -#else > +#elif GCC_VERSION < 140100 The situation is a little less clear here because the development window is fuzzy to cover. Nevertheless with all other conditionals here using only a major version, with subversion being 0, I think the same should go for 14. Unless of course there is a good reason to be inconsistent. With both adjustments: Reviewed-by: Jan Beulich <jbeulich@suse.com> Jan
Hi Jan, Jan Beulich <jbeulich@suse.com> writes: > On 27.03.2025 01:40, Volodymyr Babchuk wrote: >> GCC 14.1 has 9 gcov counters and also can call new merge function >> __gcov_merge_ior(), so we need a new stub for it. >> >> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> > > As to the title - what about 14.2.0? Or the soon to appear 14.3.0? I recommend > to say just 14. > According to GCC changelog, it was added in GCC 14.1. And yesterday they added another counter... So probably 14.3 will have 10 counters in total. >> --- a/xen/common/coverage/gcc_4_7.c >> +++ b/xen/common/coverage/gcc_4_7.c >> @@ -28,8 +28,10 @@ >> #define GCOV_COUNTERS 10 >> #elif GCC_VERSION < 100000 >> #define GCOV_COUNTERS 9 >> -#else >> +#elif GCC_VERSION < 140100 > > The situation is a little less clear here because the development window is > fuzzy to cover. Nevertheless with all other conditionals here using only a > major version, with subversion being 0, I think the same should go for 14. > Unless of course there is a good reason to be inconsistent. As I said, 9nth counter was added in GCC 14.1, GCC 14.0 had less counters. > > With both adjustments: > Reviewed-by: Jan Beulich <jbeulich@suse.com> > > Jan
On 27/03/2025 10:03 pm, Volodymyr Babchuk wrote: > Hi Jan, > > Jan Beulich <jbeulich@suse.com> writes: > >> On 27.03.2025 01:40, Volodymyr Babchuk wrote: >>> GCC 14.1 has 9 gcov counters and also can call new merge function >>> __gcov_merge_ior(), so we need a new stub for it. >>> >>> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> >> As to the title - what about 14.2.0? Or the soon to appear 14.3.0? I recommend >> to say just 14. >> > According to GCC changelog, it was added in GCC 14.1. And yesterday they > added another counter... So probably 14.3 will have 10 counters in total. Do you have links? I'd expect that to mean that GCC 15 will have 10 counters, not GCC 14.3. > >>> --- a/xen/common/coverage/gcc_4_7.c >>> +++ b/xen/common/coverage/gcc_4_7.c >>> @@ -28,8 +28,10 @@ >>> #define GCOV_COUNTERS 10 >>> #elif GCC_VERSION < 100000 >>> #define GCOV_COUNTERS 9 >>> -#else >>> +#elif GCC_VERSION < 140100 >> The situation is a little less clear here because the development window is >> fuzzy to cover. Nevertheless with all other conditionals here using only a >> major version, with subversion being 0, I think the same should go for 14. >> Unless of course there is a good reason to be inconsistent. > As I said, 9nth counter was added in GCC 14.1, GCC 14.0 had less counters. In GCC's numbering scheme, .0 is the dev window and .1 is the release. The 9th counter will have appeared somewhere in the dev window, but that's all GCC 14 as far as we're concerned. ~Andrew
Hi Andrew, Andrew Cooper <andrew.cooper3@citrix.com> writes: > On 27/03/2025 10:03 pm, Volodymyr Babchuk wrote: >> Hi Jan, >> >> Jan Beulich <jbeulich@suse.com> writes: >> >>> On 27.03.2025 01:40, Volodymyr Babchuk wrote: >>>> GCC 14.1 has 9 gcov counters and also can call new merge function >>>> __gcov_merge_ior(), so we need a new stub for it. >>>> >>>> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> >>> As to the title - what about 14.2.0? Or the soon to appear 14.3.0? I recommend >>> to say just 14. >>> >> According to GCC changelog, it was added in GCC 14.1. And yesterday they >> added another counter... So probably 14.3 will have 10 counters in total. > > Do you have links? Here is the patch that added a new counter: https://github.com/gcc-mirror/gcc/commit/8ed2d5d219e999aee42015a0db38612011c2c507 > I'd expect that to mean that GCC 15 will have 10 counters, not GCC 14.3. > I can't say for sure, of course. Anyways, it is not released yet so no sense in trying to cover it in this patches. >>>> --- a/xen/common/coverage/gcc_4_7.c >>>> +++ b/xen/common/coverage/gcc_4_7.c >>>> @@ -28,8 +28,10 @@ >>>> #define GCOV_COUNTERS 10 >>>> #elif GCC_VERSION < 100000 >>>> #define GCOV_COUNTERS 9 >>>> -#else >>>> +#elif GCC_VERSION < 140100 >>> The situation is a little less clear here because the development window is >>> fuzzy to cover. Nevertheless with all other conditionals here using only a >>> major version, with subversion being 0, I think the same should go for 14. >>> Unless of course there is a good reason to be inconsistent. >> As I said, 9nth counter was added in GCC 14.1, GCC 14.0 had less counters. > > In GCC's numbering scheme, .0 is the dev window and .1 is the release. > > The 9th counter will have appeared somewhere in the dev window, but > that's all GCC 14 as far as we're concerned. Ah, okay, thanks. I'll rework the patch to check for major version only.
diff --git a/xen/common/coverage/gcc_4_7.c b/xen/common/coverage/gcc_4_7.c index 1c20e35ee5..e3ce69dc2e 100644 --- a/xen/common/coverage/gcc_4_7.c +++ b/xen/common/coverage/gcc_4_7.c @@ -28,8 +28,10 @@ #define GCOV_COUNTERS 10 #elif GCC_VERSION < 100000 #define GCOV_COUNTERS 9 -#else +#elif GCC_VERSION < 140100 #define GCOV_COUNTERS 8 +#else +#define GCOV_COUNTERS 9 #endif #define GCOV_TAG_FUNCTION_LENGTH 3 diff --git a/xen/common/coverage/gcov_base.c b/xen/common/coverage/gcov_base.c index d0c6d0a3f9..742034e039 100644 --- a/xen/common/coverage/gcov_base.c +++ b/xen/common/coverage/gcov_base.c @@ -56,6 +56,11 @@ void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters) /* Unused. */ } +void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters) +{ + /* Unused. */ +} + /* * Local variables: * mode: C
GCC 14.1 has 9 gcov counters and also can call new merge function __gcov_merge_ior(), so we need a new stub for it. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> --- xen/common/coverage/gcc_4_7.c | 4 +++- xen/common/coverage/gcov_base.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-)