perf_counter: Add ioctl for changing the sample period/frequency
Commit-ID: 08247e31ca79b8f02cce47b7e8120797a8726606 Gitweb: http://git.kernel.org/tip/08247e31ca79b8f02cce47b7e8120797a8726606 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 2 Jun 2009 16:46:57 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 2 Jun 2009 21:45:32 +0200
perf_counter: Add ioctl for changing the sample period/frequency
Reported-by Stephane Eranian <[email protected]>
Signed-off-by Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc John Kacur <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Ingo Molnar <[email protected]>
--- include/linux/perf_counter.h | 9 +++++---- kernel/perf_counter.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-)
include/linux/perf_counter.h +5 -4
@@ -164,10 +164,11 @@ struct perf_counter_hw_event {/* * Ioctls that can be done on a perf counter fd: */ -#define PERF_COUNTER_IOC_ENABLE _IOW('$', 0, u32) -#define PERF_COUNTER_IOC_DISABLE _IOW('$', 1, u32) -#define PERF_COUNTER_IOC_REFRESH _IOW('$', 2, u32) -#define PERF_COUNTER_IOC_RESET _IOW('$', 3, u32) +#define PERF_COUNTER_IOC_ENABLE _IO ('$', 0) +#define PERF_COUNTER_IOC_DISABLE _IO ('$', 1) +#define PERF_COUNTER_IOC_REFRESH _IO ('$', 2) +#define PERF_COUNTER_IOC_RESET _IO ('$', 3) +#define PERF_COUNTER_IOC_PERIOD _IOW('$', 4, u64)enum perf_counter_ioc_flags {PERF_IOC_FLAG_GROUP =1U <<0 ,
kernel/perf_counter.c +41 -0
53 lines not on this page · raw message