lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBTRzcuiwNAvpxt_N7AaddX9GAuGBS0+hWT78GiNqd-i2A@mail.gmail.com>
Date:	Wed, 23 May 2012 16:53:13 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	zheng.z.yan@...el.com, a.p.zijlstra@...llo.nl, mingo@...e.hu,
	andi@...stfloor.org, ming.m.lin@...el.com,
	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 0/5] perf, tool: uncore related changes

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@...hat.com> 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ