public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* perf_event_open() - add PERF_IOC_FLAG_GROUP documentation
@ 2013-06-28 20:55 Vince Weaver
       [not found] ` <alpine.DEB.2.10.1306281651100.10799-6xBS8L8d439fDsnSvq7Uq4Se7xf15W0s1dQoKJhdanU@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Vince Weaver @ 2013-06-28 20:55 UTC (permalink / raw)
  To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA


The perf_event_open() ENABLE/DISABLE/RESET ioctls can take an argument,
PERF_IOC_FLAG_GROUP.  This wasn't documented at all until about a year
ago (despite the support being there from the beginning) so I missed
this when initially writing the manpage.

Signed-off-by: Vince Weaver <vincent.weaver-e7X0jjDqjFGHXe+LvDLADg@public.gmane.org>

diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index 5b8e769..5900b1c 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -1664,7 +1664,10 @@ file descriptors
 Enables the individual event or event group specified by the
 file descriptor argument.
 
-The ioctl argument is ignored.
+If the 
+.B PERF_IOC_FLAG_GROUP
+bit is set in the ioctl argument then all events in a group are 
+enabled, even if the event specified is not the group leader.
 .TP
 .B PERF_EVENT_IOC_DISABLE
 Disables the individual counter or event group specified by the
@@ -1677,7 +1680,10 @@ Enabling or disabling a member of a group other than the leader
 affects only that counter; disabling a non-leader
 stops that counter from counting but doesn't affect any other counter.
 
-The ioctl argument is ignored.
+If the 
+.B PERF_IOC_FLAG_GROUP
+bit is set in the ioctl argument then all events in a group are 
+disabled, even if the event specified is not the group leader.
 .TP
 .B PERF_EVENT_IOC_REFRESH
 Non-inherited overflow counters can use this
@@ -1702,10 +1708,18 @@ multiplexing
 or
 .I time_running
 values.
-When sent to a group leader, only
-the leader is reset (child events are not).
 
-The ioctl argument is ignored.
+If the 
+.B PERF_IOC_FLAG_GROUP
+bit is set in the ioctl argument then all events in a group are 
+reset, even if the event specified is not the group leader.
+
+If the
+.B PERF_IOC_FLAG_GROUP
+bit is not set then the behavior is somwhat unexpected:
+when sent to a group leader only the leader is reset 
+(children are left alone); 
+when sent to a child all events in a group are reset.
 .TP
 .B PERF_EVENT_IOC_PERIOD
 IOC_PERIOD is the command to update the period; it
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-02 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28 20:55 perf_event_open() - add PERF_IOC_FLAG_GROUP documentation Vince Weaver
     [not found] ` <alpine.DEB.2.10.1306281651100.10799-6xBS8L8d439fDsnSvq7Uq4Se7xf15W0s1dQoKJhdanU@public.gmane.org>
2013-07-02  4:09   ` Michael Kerrisk
     [not found]     ` <51D2525F.7070900-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-02 13:55       ` Vince Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox