Re: [RFC] perf tools: Including pre-generated flex files

From: Jiri Olsa
Date: Thu Mar 29 2012 - 08:22:23 EST

On Wed, Mar 28, 2012 at 12:46:25PM -0700, Linus Torvalds wrote:
> On Tue, Mar 27, 2012 at 11:15 AM, Arnaldo Carvalho de Melo
> <acme@xxxxxxxxxxxxx> wrote:
> >
> >        But Ingo argues that flex and bison are just a yum/whatever
> > install away, so we shouldn't clutter the kernel git history with things
> > we can generate at build time.
> >
> >        What is your take on this?
> I think I agree.
> Building the *basic* kernel is different - I want people to be able to
> build the kernel and install it and test it out with a fairly minimal
> development environment.
> But the perf tools
> (a) are mainly useful for developers who can easily install these
> things *anyway* (ie we're not talking the same kind of usage cases
> where we want to encourage random people off the street to build and
> test)
> (b) already require things that are *much* less common than flex (ie
> the whole libelf-devel stuff etc)
> so I think having pre-generated lex/yacc files is just silly - just
> install the tool.
> Linus

I just tried to generate the parser on RHEL6 and got:

CC util/parse-events-bison.o
util/parse-events-bison.c:222:6: error: "YYENABLE_NLS" is not defined
util/parse-events-bison.c:664:6: error: "YYLTYPE_IS_TRIVIAL" is not

looks like bison bug, that RHEL6 did not picked up fix for yet.

I agree with not including the parser sources in git, but we'll probably
get some screaming from ppl having similar issue like above.

Also I'm not fully sure we could even use generated bison/flex
files cross architectures.. need to check :)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at