From 82b09254afaca649d05300245151dc8dd4203e12 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 10 Oct 2013 17:20:25 -0400 Subject: [PATCH] perf_event_open.2: E2BIG documentation The following documents the E2BIG error return for perf_event_open(). I actually ran into this error the hard way and it took me half a day to figure out why my ->size value was changing. Signed-off-by: Vince Weaver Signed-off-by: Michael Kerrisk --- man2/perf_event_open.2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index 71a09d51d..f4cb5bdee 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -2121,6 +2121,21 @@ returns the new file descriptor, or \-1 if an error occurred is set appropriately). .SH ERRORS .TP +.B E2BIG +Returned if the perf_event_attr +.I size +value is too small +(smaller than +.BR PERF_ATTR_SIZE_VER0 ), +too big (larger than the page size), +or larger than the kernel supports and the extra bytes are not zero. +When +.B E2BIG +is returned, the perf_event_attr +.I size +field is over-written by the kernel to be the size of the structure +it was expecting. +.TP .B EINVAL Returned if the specified event is not available. .TP