All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Vince Weaver <vincent.weaver-e7X0jjDqjFGHXe+LvDLADg@public.gmane.org>
Cc: Michael Kerrisk
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: perf_event_open() - add PERF_IOC_FLAG_GROUP documentation
Date: Tue, 02 Jul 2013 06:09:03 +0200	[thread overview]
Message-ID: <51D2525F.7070900@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1306281651100.10799-6xBS8L8d439fDsnSvq7Uq4Se7xf15W0s1dQoKJhdanU@public.gmane.org>

On 06/28/13 22:55, Vince Weaver wrote:
> 
> 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>

Thanks, Vince. Applied.

Cheers,

Michael


> 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

  parent reply	other threads:[~2013-07-02  4:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [not found]     ` <51D2525F.7070900-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-02 13:55       ` Vince Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D2525F.7070900@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=vincent.weaver-e7X0jjDqjFGHXe+LvDLADg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.