lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-05-12 12:31    [W:0.287 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site