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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
30d476ae73
commit
dd60fba732
@@ -60,6 +60,18 @@ OPTIONS
|
||||
Note: If user explicitly sets options which conflict with the params,
|
||||
the value set by the params will be overridden.
|
||||
|
||||
Also not defined in .../<pmu>/format/* are PMU driver specific
|
||||
configuration parameters. Any configuration parameter preceded by
|
||||
the letter '@' is not interpreted in user space and sent down directly
|
||||
to the PMU driver. For example:
|
||||
|
||||
perf record -e some_event/@cfg1,@cfg2=config/ ...
|
||||
|
||||
will see 'cfg1' and 'cfg2=config' pushed to the PMU driver associated
|
||||
with the event for further processing. There is no restriction on
|
||||
what the configuration parameters are, as long as their semantic is
|
||||
understood and supported by the PMU driver.
|
||||
|
||||
- a hardware breakpoint event in the form of '\mem:addr[/len][:access]'
|
||||
where addr is the address in memory you want to break in.
|
||||
Access is the memory access type (read, write, execute) it can
|
||||
|
Reference in New Issue
Block a user