linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] perf_event_open.2 clarify the PERF_FLAG_FD_* flags
@ 2015-01-08 17:04 Vince Weaver
       [not found] ` <alpine.DEB.2.11.1501081201020.25399-6xBS8L8d439fDsnSvq7Uqyn2WXadKZNJe7X0jjDqjFGHXe+LvDLADg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Vince Weaver @ 2015-01-08 17:04 UTC (permalink / raw)
  Cc: xmtk.manpages, linux-man, linux-kernel, Peter Zijlstra,
	Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo


This change clarifies the behavior of the PERF_FLAG_FD_OUTPUT and
PERF_FLAG_FD_NO_GROUP flags to perf_event_open(), and removes
the related FIXME comments.

While writing tests to validate the behavior of these flags I
discovered that PERF_FLAG_FD_OUTPUT has been broken since the
2.6.35 kernel release.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>

diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index 8bde791..7181c29 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -149,14 +149,17 @@ then
 .BR execve (2).
 .TP
 .BR PERF_FLAG_FD_NO_GROUP
-.\" FIXME . The following sentence is unclear
-This flag allows creating an event as part of an event group but
-having no group leader.
-It is unclear why this is useful.
-.\" FIXME . So, why is it useful?
-.TP
-.BR PERF_FLAG_FD_OUTPUT
-This flag reroutes the output from an event to the group leader.
+This flag tells the event to ignore the
+.IR group_fd
+parameter except for the purpose of setting up output redirection
+using the
+.B PERF_FLAG_FD_OUTPUT
+flag.
+.TP
+.BR PERF_FLAG_FD_OUTPUT " (broken since Linux 2.6.35)."
+This flag re-routes the event's sampled output to instead
+be included in the mmap buffer of the event specified by
+.IR group_fd .
 .TP
 .BR PERF_FLAG_PID_CGROUP " (since Linux 2.6.39)."
 This flag activates per-container system-wide monitoring.

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

* Re: [patch] perf_event_open.2 clarify the PERF_FLAG_FD_* flags
       [not found] ` <alpine.DEB.2.11.1501081201020.25399-6xBS8L8d439fDsnSvq7Uqyn2WXadKZNJe7X0jjDqjFGHXe+LvDLADg@public.gmane.org>
@ 2015-01-09 13:15   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-01-09 13:15 UTC (permalink / raw)
  To: Vince Weaver
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	xmtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Peter Zijlstra,
	Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo

Hi Vince,

On 01/08/2015 06:04 PM, Vince Weaver wrote:
> 
> This change clarifies the behavior of the PERF_FLAG_FD_OUTPUT and
> PERF_FLAG_FD_NO_GROUP flags to perf_event_open(), and removes
> the related FIXME comments.

Patch applied. Thank you!

> While writing tests to validate the behavior of these flags I
> discovered that PERF_FLAG_FD_OUTPUT has been broken since the
> 2.6.35 kernel release.

Sigh!

Cheers,

Michael


> 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 8bde791..7181c29 100644
> --- a/man2/perf_event_open.2
> +++ b/man2/perf_event_open.2
> @@ -149,14 +149,17 @@ then
>  .BR execve (2).
>  .TP
>  .BR PERF_FLAG_FD_NO_GROUP
> -.\" FIXME . The following sentence is unclear
> -This flag allows creating an event as part of an event group but
> -having no group leader.
> -It is unclear why this is useful.
> -.\" FIXME . So, why is it useful?
> -.TP
> -.BR PERF_FLAG_FD_OUTPUT
> -This flag reroutes the output from an event to the group leader.
> +This flag tells the event to ignore the
> +.IR group_fd
> +parameter except for the purpose of setting up output redirection
> +using the
> +.B PERF_FLAG_FD_OUTPUT
> +flag.
> +.TP
> +.BR PERF_FLAG_FD_OUTPUT " (broken since Linux 2.6.35)."
> +This flag re-routes the event's sampled output to instead
> +be included in the mmap buffer of the event specified by
> +.IR group_fd .
>  .TP
>  .BR PERF_FLAG_PID_CGROUP " (since Linux 2.6.39)."
>  This flag activates per-container system-wide monitoring.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-09 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08 17:04 [patch] perf_event_open.2 clarify the PERF_FLAG_FD_* flags Vince Weaver
     [not found] ` <alpine.DEB.2.11.1501081201020.25399-6xBS8L8d439fDsnSvq7Uqyn2WXadKZNJe7X0jjDqjFGHXe+LvDLADg@public.gmane.org>
2015-01-09 13:15   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).