]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Add infrastructure for PMU specific configuration
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 6 Sep 2016 16:37:15 +0000 (10:37 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 13 Sep 2016 20:09:11 +0000 (17:09 -0300)
commit4b4bda1ed82d5a7206de99a417e8c6160b2131fd
tree840943df1c2f561e7de3c4a0e603f58e82b25e1a
parent399e6bd2bc444b3db65a41edf599707d6c829901
perf tools: Add infrastructure for PMU specific configuration

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

perf record -e some_event/@cfg1,@cfg2=config/ ...

will see 'cfg1' and 'cfg2=config' being added to the list of evsel
config terms.  Token 'cfg1' and 'cfg2=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>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1473179837-3293-4-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-record.txt
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