path: root/tools/perf/design.txt
diff options
authorNamhyung Kim <>2012-05-31 14:51:45 +0900
committerArnaldo Carvalho de Melo <>2012-05-31 11:38:42 -0300
commita59e64a13a927fb7530bef39e9f5e7de8268137e (patch)
tree94cc2528ff263b737a637ad20bc2e1f748fae881 /tools/perf/design.txt
parentaa5cdd308ddbb08959534be408eba8ef040b5989 (diff)
perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP
The ioctl interface of perf event fd receives 3 arguments to control event group behavior but it lacked documentation. Signed-off-by: Namhyung Kim <> Cc: Namhyung Kim <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/design.txt')
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/design.txt b/tools/perf/design.txt
index bd0bb1b1279b..67e5d0cace85 100644
--- a/tools/perf/design.txt
+++ b/tools/perf/design.txt
@@ -409,14 +409,15 @@ Counters can be enabled and disabled in two ways: via ioctl and via
prctl. When a counter is disabled, it doesn't count or generate
events but does continue to exist and maintain its count value.
-An individual counter or counter group can be enabled with
+An individual counter can be enabled with
+ ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);
or disabled with
+ ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
+For a counter group, pass PERF_IOC_FLAG_GROUP as the third argument.
Enabling or disabling the leader of a group enables or disables the
whole group; that is, while the group leader is disabled, none of the
counters in the group will count. Enabling or disabling a member of a