Re: [PATCH 1/3] perf, tool: Add parser generator for events parsing

From: Jiri Olsa
Date: Wed Dec 21 2011 - 04:55:42 EST


On Tue, Dec 20, 2011 at 03:37:22PM -0200, Arnaldo Carvalho de Melo wrote:
> Em Thu, Dec 15, 2011 at 04:30:37PM +0100, Jiri Olsa escreveu:
> > Changing event parsing to use flex/bison parse generator.
> > The event syntax stays as it is.
>
> Seems really cool, using the right tool for the task, comments:
>
> . Can we avoid more globals? Like that __event_list one.
ok, looks like there's a way to pass an parameter to the parse function,
I'll chec and make the change if possible


> . All those ABORT_ON do what? die() like stuff? /me googles YYABORT...
>
> ----
> YYABORT
> Return immediately with value 1 (to report failure).
> ----
>
> Ok, so it gets propagated back and hopefully the we die() just
> back at main() in tools/perf/perf.c, right?
right, it'll make parse_events_parse return error

>
> . make help | perf
>
> Then running one of those targets and trying to build perf still
> works? I guess so, but better check that.
>
> Having it added to some new "make perf-test" that does that +
> 'perf test' too would get you brownie points. Leave it for later/someone
> else if you're busy/not looking for more work, of course 8-)
>
> . We have some tests to parse events in 'perf test', right? From the top
> of my head it was even ya that did that, guess those are ok/improved
> (still need to look at the other patches in the backlog).
right ;)

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/