From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbdLIH0a (ORCPT ); Sat, 9 Dec 2017 02:26:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47704 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbdLIH03 (ORCPT ); Sat, 9 Dec 2017 02:26:29 -0500 Date: Sat, 9 Dec 2017 08:26:23 +0100 From: Jiri Olsa To: John Garry Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, namhyung@kernel.org, ak@linux.intel.com, wcohen@redhat.com, will.deacon@arm.com, ganapatrao.kulkarni@cavium.com, catalin.marinas@arm.com, mark.rutland@arm.com, xuwei5@hisilicon.com, linuxarm@huawei.com, zhangshaokun@hisilicon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) 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) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { From mboxrd@z Thu Jan 1 00:00:00 1970 From: jolsa@redhat.com (Jiri Olsa) Date: Sat, 9 Dec 2017 08:26:23 +0100 Subject: [RFC PATCH 2/5] perf jevents: add support for arch recommended events In-Reply-To: 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> Message-ID: <20171209072623.GA14297@krava> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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) {