Re: [RFC 0/5] perf, tool: uncore related changes
From: Stephane Eranian
Date: Wed May 23 2012 - 10:53:13 EST
Jiri,
Is there a way with the current parser to have a syntax as follows:
perf stat -e cpu/event=cycles,edge/ ...
In other words, avoid juggling between -e cycles and the -e
cpu/event=.../ syntax?
On Mon, May 21, 2012 at 9:36 AM, Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
> 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/