[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200512102951.GA3141346@krava>
Date: Tue, 12 May 2020 12:29:51 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Ian Rogers <irogers@...gle.com>
Cc: John Garry <john.garry@...wei.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>, will@...nel.org,
Andi Kleen <ak@...ux.intel.com>, linuxarm@...wei.com,
LKML <linux-kernel@...r.kernel.org>, qiangqing.zhang@....com,
robin.murphy@....com, zhangshaokun@...ilicon.com,
Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH RFC v3 02/12] perf jevents: Add support for system events
tables
On Mon, May 11, 2020 at 09:21:00AM -0700, Ian Rogers wrote:
SNIP
> > >> + fprintf(outfp, "\n\t{\n\t\t.table = %s,\n\t},",
> > >> + sys_event_table->name);
> > >> + }
> > >> + fprintf(outfp, "\n\t{\n\t\t.table = 0\n\t},");
> > >
> > > this will add extra tabs:
> > >
> > > {
> > > .table = 0
> > > },
> > >
> > > while the rest of the file starts items without any indent
> > >
> >
> > I'll ensure the indent is the same.
> >
> > BTW, is there anything to be said for removing the empty map feature
> > (and always breaking the perf build instead)? I guess that it was just
> > an early feature for dealing with unstable JSONs.
>
> +1
> I'd very much like it if JSON parse errors and the like didn't result
> in an empty map but failed the build. I think ideally we could also
yep, that seems like good approach to me
> validate metric expressions using expr.y. If we include expr.y into
> jevents then is there any need to parse the metric expression at
> runtime? Could we just generate C code from jevents with a list of
> events (aka ids) for programming and a dedicated print function for
> each metric. The events would still be symbolic and checked at
> runtime, but the expressions being C code could yield compile time
> errors.
nice idea.. not sure we are able to do that with just expr.y code,
like to generate specific C code for metric, but I'd like to see
patches for that ;-)
but we would still need expr.y int perf code for custom user metrics,
so it still needs to stay anyway
jirka
Powered by blists - more mailing lists