]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
perf_event_open.2: Add a note that dyn_size is omitted if size == 0
authorKeno Fischer <keno@juliacomputing.com>
Sun, 3 Jul 2016 23:08:33 +0000 (19:08 -0400)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 7 Jul 2016 10:05:06 +0000 (12:05 +0200)
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.

Reviewed-by: Vince Weaver <vincent.weaver@maine.edu>
man2/perf_event_open.2

index 0e42c5007036b4588a54eb86e441923867a19475..67881546edaf558b09d890a2ea9771568d944c9f 100644 (file)
@@ -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