perf counters: add prctl interface to disable/enable counters
authorIngo Molnar <mingo@elte.hu>
Thu, 11 Dec 2008 13:59:31 +0000 (14:59 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 11 Dec 2008 14:45:55 +0000 (15:45 +0100)
commit1d1c7ddbfab358445a542715551301b7fc363e28
treed4421834d109b206f39c2019ea039fd42ed22e1d
parentbae43c9945ebeef15e7952e317efb02393d3bfc7
perf counters: add prctl interface to disable/enable counters

Add a way for self-monitoring tasks to disable/enable counters summarily,
via a prctl:

PR_TASK_PERF_COUNTERS_DISABLE 31
PR_TASK_PERF_COUNTERS_ENABLE 32

Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_counter.h
include/linux/prctl.h
kernel/perf_counter.c
kernel/sys.c