Received: by 10.213.65.68 with SMTP id h4csp236539imn; Tue, 13 Mar 2018 02:38:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELsoP0hWyBAFY8n4MHNhIFwRLvM0RWE9tDC2CvKZESnruXFgMIZYnj1Kwbn7HKYRQi229jCc X-Received: by 2002:a17:902:be16:: with SMTP id r22-v6mr8474339pls.268.1520933881226; Tue, 13 Mar 2018 02:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520933881; cv=none; d=google.com; s=arc-20160816; b=XiPqeSH+GeiwrjkUTpqbxUZ2vsfxLcB7zcqamPp3VHb0bLCs5kXg2ft5HItcosYMhq XBQ2TOlWLDpyoNL+mS/XsPPEagK0SVfZ61gDUt4i6pR8jos9aMqbPjd8NcHSPRRxVkUW xEM+40jbOVh/s2sbyxDx3Oti/lyAn+YRnQQOiCUQGkLznBAncpghcCeJPLl49mxDvX6w oeUrASJ2niZjQ0OzTdxf4kUEPvJYmuxZ3veQa3tt2GEbAC7iEG1760b7ck+gUMVAGSrY sPb84C+ea/NTsCbZ98s6CbRW2zjC37z7qLPGerzPd3isMrEKSd8yG3i5zcIz45emQP/Z pmeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=OuQgiftY1fvqqqoNc5mN7vi+aIgPQROUoTGjHutClXs=; b=GBFSNpeKMtq7oH5cnJO1qZ90zd5Edrx92kicvTcQk38LBvWoTsfLXQFwi6nZzUR2s/ +fsx6PLBF0xhvlp7PZIKXl7V6umWeoTQaV3QUan9NmTQ4rbFYZICZBBdW3GR5836nE00 I7FqF4jwYmh95IM1CVVxiTRIjG3EA6hiTMmn890IjF95NqYS42apn+BXHSJc9dHixYcZ KUrEJ1Y99bEDONciS8uCfuCU5j+4IA2BsEh4iLfKgHt7pJTHRtjLxWmxnWo7GtMgOURE 4DmAdABC2ZB5iTuA4mh72O/RHlM1SlI1EYwTV6TQtMHjgzLfqYJl7tGNaVENAEUrAexw 0F3A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si48352pgd.290.2018.03.13.02.37.46; Tue, 13 Mar 2018 02:38:01 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbeCMJgh (ORCPT + 99 others); Tue, 13 Mar 2018 05:36:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6233 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752594AbeCMJge (ORCPT ); Tue, 13 Mar 2018 05:36:34 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AA2389E219C33; Tue, 13 Mar 2018 17:36:19 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Tue, 13 Mar 2018 17:36:11 +0800 Subject: Re: [PATCH v3 04/11] perf vendor events: add support for pmu events vendor subdirectory To: Arnaldo Carvalho de Melo References: <1520506716-197429-1-git-send-email-john.garry@huawei.com> <1520506716-197429-5-git-send-email-john.garry@huawei.com> <20180312182827.GA10004@kernel.org> CC: , , , , , , , , , , , , From: John Garry Message-ID: Date: Tue, 13 Mar 2018 09:36:03 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20180312182827.GA10004@kernel.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/03/2018 18:28, Arnaldo Carvalho de Melo wrote: > Em Thu, Mar 08, 2018 at 06:58:29PM +0800, John Garry escreveu: >> index 1d02faf..7b9e210 100644 >> --- a/tools/perf/pmu-events/jevents.c >> @@ -739,25 +739,77 @@ static int get_maxfds(void) >> static FILE *eventsfp; >> static char *mapfile; >> >> +static int is_leaf_dir(const char *fpath) >> +{ >> + DIR *d; >> + struct dirent *dir; >> + int res = 1; >> + >> + d = opendir(fpath); >> + if (!d) >> + return 0; >> + >> + while ((dir = readdir(d)) != NULL) { >> + if (dir->d_type == DT_DIR && dir->d_name[0] != '.') { >> + res = 0; >> + break; >> + } else if (dir->d_type == DT_UNKNOWN) { >> + char path[PATH_MAX]; > > > You forgot to add: > > #include > > Which broke the build on at least: > > [root@jouet ~]# time dm > 1 13.78 alpine:3.4 : FAIL gcc (Alpine 5.3.0) 5.3.0 > 2 14.40 alpine:3.5 : FAIL gcc (Alpine 6.2.1) 6.2.1 20160822 > 3 13.59 alpine:3.6 : FAIL gcc (Alpine 6.3.0) 6.3.0 > 4 14.94 alpine:3.7 : FAIL gcc (Alpine 6.4.0) 6.4.0 > 5 14.70 alpine:edge : FAIL gcc (Alpine 6.4.0) 6.4.0 > 6: amazonlinux:1^C^C > > I just fixed it. > > build failure: > > MKDIR /tmp/build/perf/pmu-events/ > HOSTCC /tmp/build/perf/pmu-events/json.o > MKDIR /tmp/build/perf/pmu-events/ > HOSTCC /tmp/build/perf/pmu-events/jsmn.o > HOSTCC /tmp/build/perf/pmu-events/jevents.o > LD /tmp/build/perf/libtraceevent-in.o > LINK /tmp/build/perf/libtraceevent.a > LD /tmp/build/perf/libsubcmd-in.o > CC /tmp/build/perf/plugin_jbd2.o > CC /tmp/build/perf/plugin_hrtimer.o > pmu-events/jevents.c: In function 'is_leaf_dir': > pmu-events/jevents.c:879:14: error: 'PATH_MAX' undeclared (first use in this function) > char path[PATH_MAX]; > ^~~~~~~~ > pmu-events/jevents.c:879:14: note: each undeclared identifier is reported only once for each function it appears in > AR /tmp/build/perf/libsubcmd.a > mv: can't rename '/tmp/build/perf/pmu-events/.jevents.o.tmp': No such file or directory > make[3]: *** [/git/linux/tools/build/Makefile.build:96: /tmp/build/perf/pmu-events/jevents.o] Error 1 > CC /tmp/build/perf/plugin_kmem.o > LD /tmp/build/perf/plugin_jbd2-in.o > make[2]: *** [Makefile.perf:501: /tmp/build/perf/pmu-events/jevents-in.o] Error 2 > make[2]: *** Waiting for unfinished jobs.... > GEN perf-archive > CC /tmp/build/perf/plugin_kvm.o > > > . > OK, thanks for the notification. I will check this. All the best, John