perf tools: add infrastructure for PMU specific configuration
authorMathieu Poirier <mathieu.poirier@linaro.org>
Fri, 29 Apr 2016 21:21:11 +0000 (21:21 +0000)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 20 Jun 2016 17:16:04 +0000 (11:16 -0600)
commit6a453d5d51ffc238d32d491c22b75fc9540b491c
tree2aa7dcc966dd1dbe77a8f875b81b9fc87d20fd55
parent809a241f08c44c0e31b1390f75a35c74f9d87854
perf tools: add infrastructure for PMU specific configuration

This patchset adds PMU driver specific configuration to the parser
infrastructure by preceding any term with the '@' letter.  As such
doing something like:

perf -e some_event/@drv1,@drv2=drv_config/ ...

will see 'drv1' and 'drv2=config' being added to the list of evsel config
terms.  Token 'drv1' and 'drv2=config' are not processed in user space
and are meant to be interpreted by the PMU driver.

First the lexer/parser are supplemented with the required definitions to
recognise the driver specific configuration.  From there they are simply
added to the list of event terms.  The bulk of the work is done in
function "parse_events_add_pmu()" where driver config event terms are
added to a new list of driver config terms, which in turn spliced with
the event's new driver configuration list.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h
tools/perf/util/parse-events.l
tools/perf/util/parse-events.y