aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-06-11 07:35:08 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-09 14:46:28 -0400
commitb0a873ebbf87bf38bf70b5e39a7cadc96099fa13 (patch)
tree63ab672b847aed295f99b9b2a3bbcfd5d3d35bd9 /include
parent51b0fe39549a04858001922919ab355dee9bdfcf (diff)
perf: Register PMU implementations
Simple registration interface for struct pmu, this provides the infrastructure for removing all the weak functions. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: paulus <paulus@samba.org> Cc: stephane eranian <eranian@googlemail.com> Cc: Robert Richter <robert.richter@amd.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Lin Ming <ming.m.lin@intel.com> Cc: Yanmin <yanmin_zhang@linux.intel.com> Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com> Cc: David Miller <davem@davemloft.net> Cc: Michael Cree <mcree@orcon.net.nz> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_event.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 09d048b52115..ab72f56eb372 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -561,6 +561,13 @@ struct perf_event;
561 * struct pmu - generic performance monitoring unit 561 * struct pmu - generic performance monitoring unit
562 */ 562 */
563struct pmu { 563struct pmu {
564 struct list_head entry;
565
566 /*
567 * Should return -ENOENT when the @event doesn't match this pmu
568 */
569 int (*event_init) (struct perf_event *event);
570
564 int (*enable) (struct perf_event *event); 571 int (*enable) (struct perf_event *event);
565 void (*disable) (struct perf_event *event); 572 void (*disable) (struct perf_event *event);
566 int (*start) (struct perf_event *event); 573 int (*start) (struct perf_event *event);
@@ -849,7 +856,8 @@ struct perf_output_handle {
849 */ 856 */
850extern int perf_max_events; 857extern int perf_max_events;
851 858
852extern struct pmu *hw_perf_event_init(struct perf_event *event); 859extern int perf_pmu_register(struct pmu *pmu);
860extern void perf_pmu_unregister(struct pmu *pmu);
853 861
854extern void perf_event_task_sched_in(struct task_struct *task); 862extern void perf_event_task_sched_in(struct task_struct *task);
855extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); 863extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next);