perf_counter: rework ioctl()s
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 8 May 2009 16:52:22 +0000 (18:52 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 8 May 2009 18:36:58 +0000 (20:36 +0200)
commit3df5edad87a998273aa5a9a8c728c05d855ad00e
treec8e8090b1fe518918ac85d92a172702e9544fa91
parent7fc23a5380797012e92a9633169440f2f4a21253
perf_counter: rework ioctl()s

Corey noticed that ioctl()s on grouped counters didn't work on
the whole group. This extends the ioctl() interface to take a
second argument that is interpreted as a flags field. We then
provide PERF_IOC_FLAG_GROUP to toggle the behaviour.

Having this flag gives the greatest flexibility, allowing you
to individually enable/disable/reset counters in a group, or
all together.

[ Impact: fix group counter enable/disable semantics ]

Reported-by: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090508170028.837558214@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_counter.h
kernel/perf_counter.c