Skip to content

Commit

Permalink
tracing: Show size of requested perf buffer
Browse files Browse the repository at this point in the history
If the perf buffer isn't large enough, provide a hint about how large it
needs to be for whatever is running.

Link: https://lkml.kernel.org/r/20210831043723.13481-1-robbat2@gentoo.org

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Robin H. Johnson authored and Steven Rostedt (VMware) committed Oct 27, 2021
1 parent 39d9c1c commit a90afe8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/trace/trace_event_perf.c
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit a90afe8

Please sign in to comment.