Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433834 > unrolled thread

[PATCH] gcov: Support for >=gcc-6 missing

Started byFlorian Meier <Florian.Meier@informatik.uni-erlangen.de>
First post2016-06-29 17:00 +0200
Last post2016-07-01 11:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] gcov: Support for >=gcc-6 missing Florian Meier <Florian.Meier@informatik.uni-erlangen.de> - 2016-06-29 17:00 +0200
    Re: [PATCH] gcov: Support for >=gcc-6 missing Peter Oberparleiter <oberpar@linux.vnet.ibm.com> - 2016-06-30 14:30 +0200
      Re: [PATCH] gcov: Support for >=gcc-6 missing Florian Meier <Florian.Meier@informatik.uni-erlangen.de> - 2016-07-01 11:20 +0200

#1433834 — [PATCH] gcov: Support for >=gcc-6 missing

FromFlorian Meier <Florian.Meier@informatik.uni-erlangen.de>
Date2016-06-29 17:00 +0200
Subject[PATCH] gcov: Support for >=gcc-6 missing
Message-ID<rPp85-5s5-21@gated-at.bofh.it>
Hello!

I've noticed problems ("not executed"/ "file empty") with the gcov
kernel support, when I'm using a gcc version >=6.
For me, it seems like this is no technical reason, gcc 6 just was
forgotten in the #ifdefs :).

The following patch was tested with kernel 4.6.3 and gcc-6.1.1.

I'm not 100% sure, that CGOV_COUNTERS=10 is correct, but the gcov
output seemed reasonable.

--- a/kernel/gcov/gcc_4_7.c 2016-05-16 00:43:13.000000000 +0200
+++ b/kernel/gcov/gcc_4_7.c 13:41:41.726666665 +0200
@@ -18,7 +18,9 @@
 #include <linux/vmalloc.h>
 #include "gcov.h"

-#if __GNUC__ == 5 && __GNUC_MINOR__ >= 1
+#if __GNUC__ == 6
+#define GCOV_COUNTERS 10
+#elif __GNUC__ == 5 && __GNUC_MINOR__ >= 1
 #define GCOV_COUNTERS 10
 #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
 #define GCOV_COUNTERS 9

Regards
Florian Meier

[toc] | [next] | [standalone]


#1434511

FromPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Date2016-06-30 14:30 +0200
Message-ID<rPJgt-15H-21@gated-at.bofh.it>
In reply to#1433834
On 29.06.2016 16:58, Florian Meier wrote:
> Hello!
> 
> I've noticed problems ("not executed"/ "file empty") with the gcov
> kernel support, when I'm using a gcc version >=6.
> For me, it seems like this is no technical reason, gcc 6 just was
> forgotten in the #ifdefs :).
> 
> The following patch was tested with kernel 4.6.3 and gcc-6.1.1.
> 
> I'm not 100% sure, that CGOV_COUNTERS=10 is correct, but the gcov
> output seemed reasonable.

Looking at the source of GCC 6's gcc/gcov-counter.def I don't see any
new counters added compared to GCC 5.1.0, so GCOV_COUNTERS=10 should
still be correct.

Given that the same situation could again arise with a potential GCC
7.x, adding a "__GNUC__ > 5 ||" to the condition of the existing #if
would be a longer-term solution. Could you re-post the patch with this
change?

> 
> --- a/kernel/gcov/gcc_4_7.c 2016-05-16 00:43:13.000000000 +0200
> +++ b/kernel/gcov/gcc_4_7.c 13:41:41.726666665 +0200
> @@ -18,7 +18,9 @@
>  #include <linux/vmalloc.h>
>  #include "gcov.h"
> 
> -#if __GNUC__ == 5 && __GNUC_MINOR__ >= 1
> +#if __GNUC__ == 6
> +#define GCOV_COUNTERS 10
> +#elif __GNUC__ == 5 && __GNUC_MINOR__ >= 1
>  #define GCOV_COUNTERS 10
>  #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
>  #define GCOV_COUNTERS 9
> 
> Regards
> Florian Meier
> 

-- 
Peter Oberparleiter
Linux on z Systems Development - IBM Germany

[toc] | [prev] | [next] | [standalone]


#1435183

FromFlorian Meier <Florian.Meier@informatik.uni-erlangen.de>
Date2016-07-01 11:20 +0200
Message-ID<rQ2M9-4Op-17@gated-at.bofh.it>
In reply to#1434511
On 30 June 2016 at 14:13, Peter Oberparleiter
<oberpar@linux.vnet.ibm.com> wrote:
> On 29.06.2016 16:58, Florian Meier wrote:
>> Hello!
>>
>> I've noticed problems ("not executed"/ "file empty") with the gcov
>> kernel support, when I'm using a gcc version >=6.
>> For me, it seems like this is no technical reason, gcc 6 just was
>> forgotten in the #ifdefs :).
>>
>> The following patch was tested with kernel 4.6.3 and gcc-6.1.1.
>>
>> I'm not 100% sure, that CGOV_COUNTERS=10 is correct, but the gcov
>> output seemed reasonable.
>
> Looking at the source of GCC 6's gcc/gcov-counter.def I don't see any
> new counters added compared to GCC 5.1.0, so GCOV_COUNTERS=10 should
> still be correct.
>
> Given that the same situation could again arise with a potential GCC
> 7.x, adding a "__GNUC__ > 5 ||" to the condition of the existing #if
> would be a longer-term solution. Could you re-post the patch with this
> change?
>

Yes, I'll change the patch.
Thanks for your replay.

>>
>> --- a/kernel/gcov/gcc_4_7.c 2016-05-16 00:43:13.000000000 +0200
>> +++ b/kernel/gcov/gcc_4_7.c 13:41:41.726666665 +0200
>> @@ -18,7 +18,9 @@
>>  #include <linux/vmalloc.h>
>>  #include "gcov.h"
>>
>> -#if __GNUC__ == 5 && __GNUC_MINOR__ >= 1
>> +#if __GNUC__ == 6
>> +#define GCOV_COUNTERS 10
>> +#elif __GNUC__ == 5 && __GNUC_MINOR__ >= 1
>>  #define GCOV_COUNTERS 10
>>  #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
>>  #define GCOV_COUNTERS 9
>>
>> Regards
>> Florian Meier
>>
>
> --
> Peter Oberparleiter
> Linux on z Systems Development - IBM Germany
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web