Re: [PATCH RFC v1 1/4] perf: Introduce extended syscall error reporting

Peter Zijlstra
2015-08-05T15:19:06Z

On Fri, Jul 24, 2015 at 02:45:56PM +0300, Alexander Shishkin wrote:
> +/*
> + * Use part of the [-1, -MAX_ERRNO] errno range for perf's extended error
> + * reporting. Anything within [-PERF_ERRNO, -MAX_ERRNO] is an index of a
> + * perf_err_site structure within __perf_err section. 3.5k should be enough
> + * for everybody, but let's add a boot-time warning just in case it overflows
> + * one day.
> + */
> +#define PERF_ERRNO 512

linux/errno.h has 512-529 in use, so this range overlaps with 'normal'
errno values.