lkml.org 
[lkml]   [2021]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] tracing: show size of requested buffer

I'll need Acks for these patches from the Perf maintainers.

-- Steve


On Mon, 30 Aug 2021 21:37:22 -0700
"Robin H. Johnson" <robbat2@gentoo.org> wrote:

> If the perf buffer isn't large enough, provide a hint about how large it
> needs to be for whatever is running.
>
> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
> ---
> kernel/trace/trace_event_perf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
> index 03be4435d103..26eed4b89100 100644
> --- a/kernel/trace/trace_event_perf.c
> +++ b/kernel/trace/trace_event_perf.c
> @@ -400,7 +400,8 @@ void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp)
> BUILD_BUG_ON(PERF_MAX_TRACE_SIZE % sizeof(unsigned long));
>
> if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE,
> - "perf buffer not large enough"))
> + "perf buffer not large enough, wanted %d, have %d",
> + size, PERF_MAX_TRACE_SIZE))
> return NULL;
>
> *rctxp = rctx = perf_swevent_get_recursion_context();

\
 
 \ /
  Last update: 2021-09-08 03:24    [W:0.076 / U:1.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site