From patchwork Sat Dec 9 07:26:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 10103583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E2A7160329 for ; Sat, 9 Dec 2017 07:26:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D203E28FB9 for ; Sat, 9 Dec 2017 07:26:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C402028FF7; Sat, 9 Dec 2017 07:26:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 477D528FB9 for ; Sat, 9 Dec 2017 07:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tFTapWlCeA9oKBMgZig/aul34Jbvg/ZENXE6ch3BnNM=; b=YqdUtjX3UVuSYd lmLZ+AYCikwhRtax58QwwMj4gz30nwQrfW0obrg9cQZMWoTH7kdWaRlazpAAUEFWF7xs2jls9sPN8 A9TnqR0K8K06sp7LWTsCHiRy6Pm2eWwNeoHJMQzGM24uojxEURzIKVDHOsqgV/keUTZj4oyF8ec3y VwtzJ79g+Ij2hPbSWFbgvrH+8J9nO0F4XSpAIBqAG/LQdYnkWqVbkbg7BA9Ozd33yv+PoYa71XDsv HmxTscRv222FMxQbl3Q3Rn6TlnSw5amVW4jPeyHOtPlohMeTliLL/sc55aN05uOzA8rXQHsgEGtqU ry+d6pMbJpSdC1ihVP3w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eNZXB-0003ix-Es; Sat, 09 Dec 2017 07:26:53 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eNZX7-0003g4-S4 for linux-arm-kernel@lists.infradead.org; Sat, 09 Dec 2017 07:26:51 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2FF281DE7; Sat, 9 Dec 2017 07:26:28 +0000 (UTC) Received: from krava (ovpn-204-39.brq.redhat.com [10.40.204.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66DE260C8A; Sat, 9 Dec 2017 07:26:24 +0000 (UTC) Date: Sat, 9 Dec 2017 08:26:23 +0100 From: Jiri Olsa To: John Garry Subject: Re: [RFC PATCH 2/5] perf jevents: add support for arch recommended events Message-ID: <20171209072623.GA14297@krava> References: <1512490399-94107-1-git-send-email-john.garry@huawei.com> <1512490399-94107-3-git-send-email-john.garry@huawei.com> <20171206133752.GB12508@krava> <20171208123137.GF2799@krava> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 09 Dec 2017 07:26:29 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171208_232649_930815_237C562D X-CRM114-Status: GOOD ( 16.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, ak@linux.intel.com, peterz@infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, linuxarm@huawei.com, acme@kernel.org, linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com, alexander.shishkin@linux.intel.com, mingo@redhat.com, xuwei5@hisilicon.com, ganapatrao.kulkarni@cavium.com, namhyung@kernel.org, wcohen@redhat.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Dec 08, 2017 at 03:38:06PM +0000, John Garry wrote: SNIP > > > > > > Hi jirka, > > > > > Hi jirka, > > > > The linux kernel headers are not used for jevents tool. I would rather use > > > them if possible... > > > > should be as easy as adding #include ;-) > > > > Hi jirka, > > I think the issue is that jevents is a "hostprogs", which does not use > kernel headers. > > FWIW, here is the symptom: > pmu-events/jevents.c:51:24: fatal error: linux/list.h: No such file or > directory > #include > ^ > compilation terminated. > mv: cannot stat ‘pmu-events/.jevents.o.tmp’: No such file or directory > > perf tool build is different. yep, need additional in Bukld file, attached jirka diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build index 999a4e878162..b7d2e0e9cbd0 100644 --- a/tools/perf/pmu-events/Build +++ b/tools/perf/pmu-events/Build @@ -1,5 +1,6 @@ hostprogs := jevents +CHOSTFLAGS = -I$(srctree)/tools/include jevents-y += json.o jsmn.o jevents.o pmu-events-y += pmu-events.o JDIR = pmu-events/arch/$(SRCARCH) diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index b578aa26e375..5b9b1fee3dfe 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -47,6 +47,7 @@ #include "jsmn.h" #include "json.h" #include "jevents.h" +#include int verbose; char *prog; @@ -884,6 +885,7 @@ int main(int argc, char *argv[]) const char *output_file; const char *start_dirname; struct stat stbuf; + struct list_head krava __maybe_unused; prog = basename(argv[0]); if (argc < 4) {