aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-06-15 06:22:39 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-09 14:46:30 -0400
commitad5133b7030d04ce7701aa7cbe98f561347c79c2 (patch)
treeb0593f2cdc40432ad2d91c5eaa9485df328ab97b /include/linux/perf_event.h
parent33696fc0d141bbbcb12f75b69608ea83282e3117 (diff)
perf: Default PMU ops
Provide default implementations for the pmu txn methods, this allows us to remove some conditional code. 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/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 6abf103fb7f8..bf85733597ec 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -565,8 +565,8 @@ struct pmu {
565 565
566 int *pmu_disable_count; 566 int *pmu_disable_count;
567 567
568 void (*pmu_enable) (struct pmu *pmu); 568 void (*pmu_enable) (struct pmu *pmu); /* optional */
569 void (*pmu_disable) (struct pmu *pmu); 569 void (*pmu_disable) (struct pmu *pmu); /* optional */
570 570
571 /* 571 /*
572 * Should return -ENOENT when the @event doesn't match this PMU. 572 * Should return -ENOENT when the @event doesn't match this PMU.
@@ -590,19 +590,19 @@ struct pmu {
590 * Start the transaction, after this ->enable() doesn't need to 590 * Start the transaction, after this ->enable() doesn't need to
591 * do schedulability tests. 591 * do schedulability tests.
592 */ 592 */
593 void (*start_txn) (struct pmu *pmu); 593 void (*start_txn) (struct pmu *pmu); /* optional */
594 /* 594 /*
595 * If ->start_txn() disabled the ->enable() schedulability test 595 * If ->start_txn() disabled the ->enable() schedulability test
596 * then ->commit_txn() is required to perform one. On success 596 * then ->commit_txn() is required to perform one. On success
597 * the transaction is closed. On error the transaction is kept 597 * the transaction is closed. On error the transaction is kept
598 * open until ->cancel_txn() is called. 598 * open until ->cancel_txn() is called.
599 */ 599 */
600 int (*commit_txn) (struct pmu *pmu); 600 int (*commit_txn) (struct pmu *pmu); /* optional */
601 /* 601 /*
602 * Will cancel the transaction, assumes ->disable() is called 602 * Will cancel the transaction, assumes ->disable() is called
603 * for each successfull ->enable() during the transaction. 603 * for each successfull ->enable() during the transaction.
604 */ 604 */
605 void (*cancel_txn) (struct pmu *pmu); 605 void (*cancel_txn) (struct pmu *pmu); /* optional */
606}; 606};
607 607
608/** 608/**