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

From: Arnaldo Carvalho de Melo
Date: Tue Mar 27 2012 - 14:16:07 EST

Hi Linus,

We now use lex and bison for the events and PMU parser:

[acme@sandy linux]$ wc -l tools/perf/util/*.[yl]
126 tools/perf/util/parse-events.l
229 tools/perf/util/parse-events.y
43 tools/perf/util/pmu.l
93 tools/perf/util/pmu.y
491 total

Jiri and Peter agreed on having pre-generated files:

[acme@sandy linux]$ wc -l tools/perf/util/*-{bison,flex}.[ch]
1917 tools/perf/util/parse-events-bison.c
81 tools/perf/util/parse-events-bison.h
1663 tools/perf/util/pmu-bison.c
73 tools/perf/util/pmu-bison.h
2272 tools/perf/util/parse-events-flex.c
316 tools/perf/util/parse-events-flex.h
1821 tools/perf/util/pmu-flex.c
316 tools/perf/util/pmu-flex.h
8459 total

so that we don't require even more tools to build the kernel, following
the precedent of:

[acme@sandy linux]$ wc -l scripts/*/*.[ch]_shipped
1976 scripts/dtc/dtc-lexer.lex.c_shipped
1946 scripts/dtc/dtc-parser.tab.c_shipped
86 scripts/dtc/dtc-parser.tab.h_shipped
220 scripts/genksyms/keywords.hash.c_shipped
2245 scripts/genksyms/lex.lex.c_shipped
2399 scripts/genksyms/parse.tab.c_shipped
95 scripts/genksyms/parse.tab.h_shipped
286 scripts/kconfig/zconf.hash.c_shipped
2420 scripts/kconfig/zconf.lex.c_shipped
2504 scripts/kconfig/zconf.tab.c_shipped
14177 total
[acme@sandy linux]$

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?

- Arnaldo
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/