Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1209131imu; Wed, 16 Jan 2019 14:51:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5flgtN76vUv0gBNdbO9Gs0gy0UQidr2Jf60UjrrYr/zezrQB2lvwBzM9dI/HBzLcEFPxti X-Received: by 2002:a62:4587:: with SMTP id n7mr12164599pfi.118.1547679111426; Wed, 16 Jan 2019 14:51:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547679111; cv=none; d=google.com; s=arc-20160816; b=wsqOSurBrJt1VUAolQe0mO6OzPKDMWJRk3NOWtBp12C+oFMH+ML8DOWEGepre5qJ7F CZZpr58j8UYpjUNTc+2u8yalb0xZ7Az12hEYKLrvOV/ECmx+OpmLwfZRr7FjEKQYFFhp I9vq8udTJvyUZLrdIn7e4PJroHEWfmJiO/xfwWEMsFaDrKmrRgq7mgHreIYhSdW+kxkr NIOA6iUTalxcxREZ8yB2WV1Dw11mDFD+Fb95kXuopB7dh+6KMUXqNKK/8ZiU9HrHGKCo c42hPSyUedt7irlSAL1R9h036dEGFcMFYTOdeNRKopARhwhil+ux6gQQUZgcOxe2ks65 hS1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:date:from:references:cc :to:subject; bh=kU2+S705znP0OflEuIoIlRvLGM6uu2RckKc9WI0iy8o=; b=m4ozuLEX3bXlfliisMsuwX0TYLjnGEXy6QDl1VTXjdzXn2RU34DwDbGxhpzOfvpEu6 DEFdVkXqzY232COsb3fhDqsWNciLEmb7eGBvPuuQvUWc7qZT4wMO/F8Wq4M9ddW1s6pz 7ZV6UcjzQTO+5vVfJJWiZlUJD+eKoiiy4sX3SnYaxFWPhGpGmA4q6V6Ex3SFl10BeGrZ 8r40T3AWRwVFK2UA9a6dNv90kXc/ua0OtATRztq2hyWkaEY9gxA7/aTorxfKxI1QInCA rG5jLcIAzuZX9qswUam9MfVXoBXhewNr9I8EyiCiSI3WSxeEEPEuiW52e0vpaYI8A7WZ q4Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si7692617pff.161.2019.01.16.14.51.36; Wed, 16 Jan 2019 14:51:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404909AbfAPPdH (ORCPT + 99 others); Wed, 16 Jan 2019 10:33:07 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45382 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732887AbfAPPdG (ORCPT ); Wed, 16 Jan 2019 10:33:06 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0GFU8Fo022327 for ; Wed, 16 Jan 2019 10:33:05 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q24cmrsc2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Jan 2019 10:33:05 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 Jan 2019 15:33:02 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 16 Jan 2019 15:33:00 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0GFWx1Q4850158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Jan 2019 15:32:59 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A9FE42041; Wed, 16 Jan 2019 15:32:59 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F5234203F; Wed, 16 Jan 2019 15:32:58 +0000 (GMT) Received: from [9.83.224.254] (unknown [9.83.224.254]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 Jan 2019 15:32:58 +0000 (GMT) Subject: Re: [PATCH 1/4] gcov: clang: move common gcc code into gcc_base.c To: Tri Vo Cc: ghackmann@android.com, ndesaulniers@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, Greg Hackmann , Trilok Soni , Prasad Sodagudi References: <20190114210426.177543-1-trong@android.com> <20190114210426.177543-2-trong@android.com> From: Peter Oberparleiter Date: Wed, 16 Jan 2019 16:32:59 +0100 MIME-Version: 1.0 In-Reply-To: <20190114210426.177543-2-trong@android.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19011615-0028-0000-0000-0000033A06D4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19011615-0029-0000-0000-000023F72E73 Message-Id: <4d5052ca-aeec-27f3-63d2-1b064282d234@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-16_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901160126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.01.2019 22:04, Tri Vo wrote: > From: Greg Hackmann > > base.c contains a few callbacks specific to GCC's gcov implementation. > Move these into their own module in preparation for clang support. Minor nitpick: at least in commit messages, a consistent capitalization of "Clang" would be preferable. > diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile > index ff06d64df397..45431ed679d1 100644 > --- a/kernel/gcov/Makefile > +++ b/kernel/gcov/Makefile [...] > -void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters) > -{ > - /* Unused. */ > -} > -EXPORT_SYMBOL(__gcov_merge_icall_topn); > +int gcov_events_enabled; > +DEFINE_MUTEX(gcov_lock); > > void __gcov_exit(void) > { Unless __gcov_exit() is required by Clang, it should also be moved. > diff --git a/kernel/gcov/gcc_base.c b/kernel/gcov/gcc_base.c > new file mode 100644 > index 000000000000..823565bcf9bf > --- /dev/null > +++ b/kernel/gcov/gcc_base.c > @@ -0,0 +1,79 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +#include > +#include linux/export.h should be included for the EXPORT_SYMBOL() macro. -- Peter Oberparleiter Linux on Z Development - IBM Germany