diff options
author | Sukadev Bhattiprolu <[email protected]> | 2015-09-03 20:07:51 -0700 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2015-09-13 11:27:28 +0200 |
commit | 4a00c16e552ea5e71756cd29cd2df7557ec9cac4 (patch) | |
tree | 05e3a180a8e8cc5ba8504046141c8084bb727e7c /arch/sparc/kernel/perf_event.c | |
parent | 7d88962e230c8342080e7e2fe9dd5be43dc13b79 (diff) |
perf/core: Define PERF_PMU_TXN_READ interface
Define a new PERF_PMU_TXN_READ interface to read a group of counters
at once.
pmu->start_txn() // Initialize before first event
for each event in group
pmu->read(event); // Queue each event to be read
rc = pmu->commit_txn() // Read/update all queued counters
Note that we use this interface with all PMUs. PMUs that implement this
interface use the ->read() operation to _queue_ the counters to be read
and use ->commit_txn() to actually read all the queued counters at once.
PMUs that don't implement PERF_PMU_TXN_READ ignore ->start_txn() and
->commit_txn() and continue to read counters one at a time.
Thanks to input from Peter Zijlstra.
Signed-off-by: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
0 files changed, 0 insertions, 0 deletions