aboutsummaryrefslogtreecommitdiff
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2016-05-31 16:32:55 -0600
committerMathieu Poirier <mathieu.poirier@linaro.org>2016-06-20 11:09:45 -0600
commit1efb79086e3298b07f8734aae7614aa25ef82040 (patch)
tree4f2bf7df370b09880bc53ffadfe7aeeeba6516e5 /include/linux/perf_event.h
parent65ad7b198dccae96d776db85d1a184df214dddb4 (diff)
perf/core: adding PMU driver specific configuration
It is entirely possible that some PMUs need specific configuration that is currently not found in the perf options before a session can be setup. It is the case for the CoreSight PMU where a sink needs to be provided. That sink doesn't fall in any of the current perf options. As such this patch adds the capability to receive driver specific configuration using the existing ioctl() mechanism. Once the configuration has been pushed down the kernel PMU callbacks are used to deal with the information sent from user space. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index f9828a48f16a..6e02e62fa1d9 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -391,6 +391,14 @@ struct pmu {
* Filter events for PMU-specific reasons.
*/
int (*filter_match) (struct perf_event *event); /* optional */
+
+ /*
+ * Initial, PMU driver specific configuration.
+ */
+ int (*get_drv_configs) (struct perf_event *event,
+ void __user *arg); /* optional */
+ void (*free_drv_configs) (struct perf_event *event);
+ /* optional */
};
/**
@@ -558,6 +566,7 @@ struct perf_event {
struct irq_work pending;
atomic_t event_limit;
+ struct list_head drv_configs;
void (*destroy)(struct perf_event *);
struct rcu_head rcu_head;