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

From: Ingo Molnar
Date: Tue Mar 27 2012 - 14:33:40 EST



* 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.e. we could just autogenerate automatically via something like
the patch below.

My main worry was that Linus would (somewhat rightfully) object
to the large diffstats that these things introduce:

tools/perf/util/parse-events-bison.c | 1917 +++++++++++++++++
tools/perf/util/parse-events-bison.h | 81 +
tools/perf/util/parse-events-flex.c | 2272 ++++++++++++++++++++
tools/perf/util/parse-events-flex.h | 316 +++
tools/perf/util/parse-events.c | 603 +++---
tools/perf/util/parse-events.h | 49 +
tools/perf/util/parse-events.l | 126 ++
tools/perf/util/parse-events.y | 229 ++
tools/perf/util/pmu-bison.c | 1663 ++++++++++++++
tools/perf/util/pmu-bison.h | 73 +
tools/perf/util/pmu-flex.c | 1821 ++++++++++++++++
tools/perf/util/pmu-flex.h | 316 +++

I mean, since auto-generating them is in the Makefile *already*,
the only argument in favor of it is that whether we want to make
the perf build depend on bison and flex.

Anyway, it would be nice if we could hear an official opinion on
this. I didn't want to send the latest perf/urgent with this
diffstat until this is settled one way or another.

Thanks,

Ingo

------------->