From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753331AbdLHMbo (ORCPT ); Fri, 8 Dec 2017 07:31:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59976 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbdLHMbl (ORCPT ); Fri, 8 Dec 2017 07:31:41 -0500 Date: Fri, 8 Dec 2017 13:31:37 +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: <20171208123137.GF2799@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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]); Fri, 08 Dec 2017 12:31:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 06, 2017 at 02:40:10PM +0000, John Garry wrote: > On 06/12/2017 13:37, Jiri Olsa wrote: > > On Wed, Dec 06, 2017 at 12:13:16AM +0800, John Garry wrote: > > > > SNIP > > > > > --- > > > tools/perf/pmu-events/jevents.c | 215 ++++++++++++++++++++++++++++++++++++---- > > > 1 file changed, 198 insertions(+), 17 deletions(-) > > > > > > diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c > > > index a0d489e..a820ed4 100644 > > > --- a/tools/perf/pmu-events/jevents.c > > > +++ b/tools/perf/pmu-events/jevents.c > > > @@ -42,6 +42,7 @@ > > > #include > > > #include /* getrlimit */ > > > #include /* getrlimit */ > > > +#include > > > #include > > > #include > > > #include "jsmn.h" > > > @@ -366,6 +367,94 @@ static int print_events_table_entry(void *data, char *name, char *event, > > > return 0; > > > } > > > > > > +struct event_struct { > > > + char *name; > > > + char *event; > > > + char *desc; > > > + char *long_desc; > > > + char *pmu; > > > + char *unit; > > > + char *perpkg; > > > + char *metric_expr; > > > + char *metric_name; > > > + char *metric_group; > > > + LIST_ENTRY(event_struct) list; > > > > is there any reason you don't use the 'struct list_head' ? > > I dont think we want another thingie involved for lists > > 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 ;-) it's heavily used within perf and I'm pretty sure we want to keep around just one way of doing lists thanks, jirka