All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf_event_open.2: Add a note that dyn_size is omitted if size == 0
@ 2016-07-03 23:08 Keno Fischer
       [not found] ` <CABV8kRwrvuPsqwep5xJv+G_vN6cK=xqWRHRp0ducR7pZxwfr6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Keno Fischer @ 2016-07-03 23:08 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, vincent.weaver-e7X0jjDqjFGHXe+LvDLADg

The perf_output_sample_ustack in kernel/events/core.c only writes a
single 64 bit word
if it can't dump the user registers. From the current version of the
man page, I would
have expected two 64 bit words (one for size, one for dyn_size). Change the man
page to make this behavior explicit.

This is my first man-pages patch, please let me know if I should do
anything else.

---
 man2/perf_event_open.2 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index 0e42c50..6788154 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -1994,7 +1994,7 @@ struct {
                       /* if PERF_SAMPLE_REGS_USER */
     u64   size;       /* if PERF_SAMPLE_STACK_USER */
     char  data[size]; /* if PERF_SAMPLE_STACK_USER */
-    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */
+    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER && size != 0 */
     u64   weight;     /* if PERF_SAMPLE_WEIGHT */
     u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */
     u64   transaction;/* if PERF_SAMPLE_TRANSACTION */
@@ -2185,6 +2185,11 @@ stack pointer at the time of sampling).
 .I dyn_size
 is the amount of data actually dumped (can be less than
 .IR size ).
+Note that
+.I dyn_size
+is omitted if
+.I size
+is 0.
 .TP
 .I weight
 If
--
2.6.4
--
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] 4+ messages in thread

* Re: [PATCH] perf_event_open.2: Add a note that dyn_size is omitted if size == 0
       [not found] ` <CABV8kRwrvuPsqwep5xJv+G_vN6cK=xqWRHRp0ducR7pZxwfr6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-07-04 17:11   ` Vince Weaver
  2016-07-07 10:08     ` Michael Kerrisk (man-pages)
  2016-07-07 10:06   ` Michael Kerrisk (man-pages)
  1 sibling, 1 reply; 4+ messages in thread
From: Vince Weaver @ 2016-07-04 17:11 UTC (permalink / raw)
  To: Keno Fischer
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA,
	vincent.weaver-e7X0jjDqjFGHXe+LvDLADg

On Sun, 3 Jul 2016, Keno Fischer wrote:

> The perf_output_sample_ustack in kernel/events/core.c only writes a
> single 64 bit word
> if it can't dump the user registers. From the current version of the
> man page, I would
> have expected two 64 bit words (one for size, one for dyn_size). Change the man
> page to make this behavior explicit.
> 
> This is my first man-pages patch, please let me know if I should do
> anything else.

Overall it looks fine, to me at least. 

It's sometimes also nice to have the commit where the behavior was first 
introuduced mentioned, but in this case since the behavior hasn't changed 
since introduction that's probably not necessary.

I'm fine with this being taken directly.  (not sure if I should kick in a 
reviewed-by or some such tag (?)).
 
I'm slowly catching up on the backlog of perf_event_open.2 updates, 
hopefully I'll start sending those in soon.

Vince
--
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] 4+ messages in thread

* Re: [PATCH] perf_event_open.2: Add a note that dyn_size is omitted if size == 0
       [not found] ` <CABV8kRwrvuPsqwep5xJv+G_vN6cK=xqWRHRp0ducR7pZxwfr6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2016-07-04 17:11   ` Vince Weaver
@ 2016-07-07 10:06   ` Michael Kerrisk (man-pages)
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-07-07 10:06 UTC (permalink / raw)
  To: Keno Fischer
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA,
	vincent.weaver-e7X0jjDqjFGHXe+LvDLADg

On 07/04/2016 01:08 AM, Keno Fischer wrote:
> The perf_output_sample_ustack in kernel/events/core.c only writes a
> single 64 bit word
> if it can't dump the user registers. From the current version of the
> man page, I would
> have expected two 64 bit words (one for size, one for dyn_size). Change the man
> page to make this behavior explicit.
>
> This is my first man-pages patch, please let me know if I should do
> anything else.

Looks good to me, Keno. Applied. Thanks for the patch!

Cheers,

Michael

> ---
>  man2/perf_event_open.2 | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
> index 0e42c50..6788154 100644
> --- a/man2/perf_event_open.2
> +++ b/man2/perf_event_open.2
> @@ -1994,7 +1994,7 @@ struct {
>                        /* if PERF_SAMPLE_REGS_USER */
>      u64   size;       /* if PERF_SAMPLE_STACK_USER */
>      char  data[size]; /* if PERF_SAMPLE_STACK_USER */
> -    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */
> +    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER && size != 0 */
>      u64   weight;     /* if PERF_SAMPLE_WEIGHT */
>      u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */
>      u64   transaction;/* if PERF_SAMPLE_TRANSACTION */
> @@ -2185,6 +2185,11 @@ stack pointer at the time of sampling).
>  .I dyn_size
>  is the amount of data actually dumped (can be less than
>  .IR size ).
> +Note that
> +.I dyn_size
> +is omitted if
> +.I size
> +is 0.
>  .TP
>  .I weight
>  If
> --
> 2.6.4
>


-- 
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] 4+ messages in thread

* Re: [PATCH] perf_event_open.2: Add a note that dyn_size is omitted if size == 0
  2016-07-04 17:11   ` Vince Weaver
@ 2016-07-07 10:08     ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-07-07 10:08 UTC (permalink / raw)
  To: Vince Weaver, Keno Fischer
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA

Hello Vince,

On 07/04/2016 07:11 PM, Vince Weaver wrote:
> On Sun, 3 Jul 2016, Keno Fischer wrote:
>
>> The perf_output_sample_ustack in kernel/events/core.c only writes a
>> single 64 bit word
>> if it can't dump the user registers. From the current version of the
>> man page, I would
>> have expected two 64 bit words (one for size, one for dyn_size). Change the man
>> page to make this behavior explicit.
>>
>> This is my first man-pages patch, please let me know if I should do
>> anything else.
>
> Overall it looks fine, to me at least.

It helps hugely when I get a review by someone! Thanks!
(And Keno, thanks also for thinking to CC Vince!)

> It's sometimes also nice to have the commit where the behavior was first
> introuduced mentioned, but in this case since the behavior hasn't changed
> since introduction that's probably not necessary.
>
> I'm fine with this being taken directly.  (not sure if I should kick in a
> reviewed-by or some such tag (?)).

I added one for you.

> I'm slowly catching up on the backlog of perf_event_open.2 updates,
> hopefully I'll start sending those in soon.

That would of course be wonderful!

Cheers,

Michael


-- 
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] 4+ messages in thread

end of thread, other threads:[~2016-07-07 10:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03 23:08 [PATCH] perf_event_open.2: Add a note that dyn_size is omitted if size == 0 Keno Fischer
     [not found] ` <CABV8kRwrvuPsqwep5xJv+G_vN6cK=xqWRHRp0ducR7pZxwfr6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-04 17:11   ` Vince Weaver
2016-07-07 10:08     ` Michael Kerrisk (man-pages)
2016-07-07 10:06   ` Michael Kerrisk (man-pages)

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.