Re: [PATCH v2 1/6] perf: Introduce extended syscall error reporting

2015-09-01 Thread Alexander Shishkin
Andy Shevchenko writes: > On Mon, Aug 24, 2015 at 5:32 PM, Alexander Shishkin > wrote: >> + /* trim the buffer to the supplied boundary */ >> + len = strlen(buffer); >> + if (len >= attr->perf_err_size) { >> + len = attr->perf_err_size - 1; >> +

Re: [PATCH v2 1/6] perf: Introduce extended syscall error reporting

2015-09-01 Thread Alexander Shishkin
Andy Shevchenko writes: > On Mon, Aug 24, 2015 at 5:32 PM, Alexander Shishkin > wrote: >> + /* trim the buffer to the supplied boundary */ >> + len = strlen(buffer); >> + if (len >= attr->perf_err_size) { >> +

Re: [PATCH v2 1/6] perf: Introduce extended syscall error reporting

2015-08-31 Thread Andy Shevchenko
On Mon, Aug 24, 2015 at 5:32 PM, Alexander Shishkin wrote: One small comment below. > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -49,6 +49,79 @@ > > #include > > +static bool extended_reporting_enabled(struct perf_event_attr *attr) > +{ > + if (attr->size >=

Re: [PATCH v2 1/6] perf: Introduce extended syscall error reporting

2015-08-31 Thread Andy Shevchenko
On Mon, Aug 24, 2015 at 5:32 PM, Alexander Shishkin wrote: One small comment below. > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -49,6 +49,79 @@ > > #include > > +static bool extended_reporting_enabled(struct perf_event_attr *attr) > +{ >

[PATCH v2 1/6] perf: Introduce extended syscall error reporting

2015-08-24 Thread Alexander Shishkin
It has been pointed several times out that perf syscall error reporting leaves a lot to be desired [1]. This patch introduces a fairly simple extension that allows call sites to annotate their error codes with arbitrary strings, which will then be copied to userspace (if they asked for it) along

[PATCH v2 1/6] perf: Introduce extended syscall error reporting

2015-08-24 Thread Alexander Shishkin
It has been pointed several times out that perf syscall error reporting leaves a lot to be desired [1]. This patch introduces a fairly simple extension that allows call sites to annotate their error codes with arbitrary strings, which will then be copied to userspace (if they asked for it) along