From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932114AbcF3MZ0 (ORCPT ); Thu, 30 Jun 2016 08:25:26 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:21363 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751858AbcF3MZY (ORCPT ); Thu, 30 Jun 2016 08:25:24 -0400 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: oberpar@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Subject: Re: [PATCH] gcov: Support for >=gcc-6 missing To: Florian Meier References: Cc: linux-kernel@vger.kernel.org From: Peter Oberparleiter Date: Thu, 30 Jun 2016 14:13:38 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16063012-0004-0000-0000-0000033C7454 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16063012-0005-0000-0000-00001AAAB509 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-30_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606300116 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > #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