Skip to content

Commit

Permalink
perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP
Browse files Browse the repository at this point in the history
The ioctl interface of perf event fd receives 3 arguments to control
event group behavior but it lacked documentation.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1338443506-25009-2-git-send-email-namhyung.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed May 31, 2012
1 parent aa5cdd3 commit a59e64a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/perf/design.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);

or disabled with

ioctl(fd, PERF_EVENT_IOC_DISABLE);
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
Expand Down

0 comments on commit a59e64a

Please sign in to comment.