Received: by 10.213.65.68 with SMTP id h4csp216018imn; Mon, 12 Mar 2018 11:29:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELunZqaFuFR0zGdTxGnFrE2rwNF8Gndrj4+8uWeBFmRNFAH72US72N30TjLHr7g1XqliNdFi X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr9286285plb.338.1520879383597; Mon, 12 Mar 2018 11:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520879383; cv=none; d=google.com; s=arc-20160816; b=SxIlG4hMYDsajaKBYefmNHpNqh8l+Wzu81i7M5Voqr+ywinR0lqege9wHqqPo1TbB1 FJZrX0/iSaw8eU8qlafOPCp+onDef5NAOYaVUbzjFjXuCEI+bwQj8kLLZ/cE35oRM/t7 zc7OrsZ+5K9M4pSZnf+eA4gXRCTnCeIF5F6ZwW+2aXxQlqc06rc1Ou7G0Z2pD6p3E/DR IzKXat4dvQqHHTcOIFRtYDuX8VomgbdcCoBg3x16mmPbzdhRF/fAIy/GhEvdbxf8/kRZ dkfgWHGClORu/KM90Hxlvab6pe1iXjdFh9GIlm8uVOBsmkAZ5V3N7fckRb7t7/2aJI7A ojgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=Q0AvcGTk7iYYak39xX/d+LtEs3O+SpiIBdk8ijpo24I=; b=hQoNJDpCIB6gEX9DFjusQKa8CIes8jJmDA2Z2DBgYeogpUwmeDs324XpOWz+hf7KfG G4GArhf0urScpA09kGoV0jfMR0tcVG7cdP1CVRiZmUySwUW7S4O/I73C1j0amDRNg/Is pNY6kMlL8hgAoHprky2HX8fPL8sN1vmHSoAhAb2oFdOH7GM+CkxRQ3zrEsafRg9rkf44 N6QDOZMth+mMV9vzg12hiL/s03EUMPZTrqPUcTSOdzjT/iqZNjkeRRO3EkIQKls0bTsJ /xhCh9kvfgyvxkRkGehUcAOIW9x3fKpzZE0Qa99y0ZOwvqIT089Z3XRxYlOs/sz7i2MG Ejhw== 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 e23si6110522pfn.228.2018.03.12.11.29.25; Mon, 12 Mar 2018 11:29:43 -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 S932211AbeCLS2c (ORCPT + 99 others); Mon, 12 Mar 2018 14:28:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:56956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbeCLS2b (ORCPT ); Mon, 12 Mar 2018 14:28:31 -0400 Received: from jouet.infradead.org (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F39D208FE; Mon, 12 Mar 2018 18:28:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F39D208FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Received: by jouet.infradead.org (Postfix, from userid 1000) id CA34B1450F1; Mon, 12 Mar 2018 15:28:27 -0300 (-03) Date: Mon, 12 Mar 2018 15:28:27 -0300 From: Arnaldo Carvalho de Melo To: John Garry Cc: jolsa@redhat.com, ak@linux.intel.com, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, wcohen@redhat.com, will.deacon@arm.com, ganapatrao.kulkarni@cavium.com, linuxarm@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, zhangshaokun@hisilicon.com Subject: Re: [PATCH v3 04/11] perf vendor events: add support for pmu events vendor subdirectory Message-ID: <20180312182827.GA10004@kernel.org> References: <1520506716-197429-1-git-send-email-john.garry@huawei.com> <1520506716-197429-5-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520506716-197429-5-git-send-email-john.garry@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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