[lkml]   [2012]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC] perf tools: Including pre-generated flex files
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/
86 scripts/dtc/
220 scripts/genksyms/keywords.hash.c_shipped
2245 scripts/genksyms/lex.lex.c_shipped
2399 scripts/genksyms/
95 scripts/genksyms/
286 scripts/kconfig/zconf.hash.c_shipped
2420 scripts/kconfig/zconf.lex.c_shipped
2504 scripts/kconfig/
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

 \ /
  Last update: 2012-03-27 20:19    [W:0.071 / U:8.188 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site