[RFC 0/5] perf, tool: uncore related changes

From: Jiri Olsa
Date: Mon May 21 2012 - 03:37:16 EST


hi,
this patchset is based on parsing fixies I just sent out
and CC-ed you.

I found a way to reuse the event parsing grammar for just
term parsing. I had to make some other changes as well:

- we end up with 2 start symbols for event grammar to differentiate
between event parsing and terms parsing

- we have now 2 diferent structures with parser arguments
for each event parsing and terms parsing

- I kept the reentrant parser.. it's not needed but I think
it's better than non reentrant ;)
I'm passing yyscanner instead of yylval and yytext as you did,
because you can get yylval and yytext out of yyscanner,
also I think it's more generic

- added automated tests for terms parsing, but we need automated
tests for term aliasing (patch 4/5) .. similar pmu tests as
for pmu format parsing

attached patches:
1/5 perf, tool: Use data struct for arg passing in event parse function
2/5 perf, tool: Make the event parser reentrantable
3/5 perf, tool: Add support to reuse event grammar to parse out terms
4/5 perf, tool: Add pmu event alias support
5/5 perf, tool: Add automated test for pure terms parsing

thanks for comments,
jirka
---
tools/perf/util/parse-events-test.c | 122 +++++++++++++++++++++++++++-
tools/perf/util/parse-events.c | 71 ++++++++++++++---
tools/perf/util/parse-events.h | 15 +++-
tools/perf/util/parse-events.l | 129 ++++++++++++++++++-----------
tools/perf/util/parse-events.y | 71 ++++++++++++-----
tools/perf/util/pmu.c | 152 +++++++++++++++++++++++++++++++++++
tools/perf/util/pmu.h | 11 +++-
7 files changed, 483 insertions(+), 88 deletions(-)
--
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/