Skip to content

Commit a90afe8

Browse files
robbat2rostedt
authored andcommitted
tracing: Show size of requested perf buffer
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/[email protected] Signed-off-by: Robin H. Johnson <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 39d9c1c commit a90afe8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/trace/trace_event_perf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@ void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp)
400400
BUILD_BUG_ON(PERF_MAX_TRACE_SIZE % sizeof(unsigned long));
401401

402402
if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE,
403-
"perf buffer not large enough"))
403+
"perf buffer not large enough, wanted %d, have %d",
404+
size, PERF_MAX_TRACE_SIZE))
404405
return NULL;
405406

406407
*rctxp = rctx = perf_swevent_get_recursion_context();

0 commit comments

Comments
 (0)