]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tracing/perf: Move the PERF_MAX_TRACE_SIZE check into perf_trace_buf_prepare()
authorOleg Nesterov <oleg@redhat.com>
Mon, 17 Jun 2013 17:02:11 +0000 (19:02 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 19 Jul 2013 01:31:28 +0000 (21:31 -0400)
commitcd92bf61d6d70bd3eb33b46d600e3f3eb9c5778a
tree7f02ec47e54b3fa2a139a21bbcfed90318de79d3
parent421c7860c6e1989da3962fafdd6699316c9f8e20
tracing/perf: Move the PERF_MAX_TRACE_SIZE check into perf_trace_buf_prepare()

Every perf_trace_buf_prepare() caller does
WARN_ONCE(size > PERF_MAX_TRACE_SIZE, message) and "message" is
almost the same.

Shift this WARN_ONCE() into perf_trace_buf_prepare(). This changes
the meaning of _ONCE, but I think this is fine.

4947014 2932448 10104832  17984294  1126b26 vmlinux
4948422 2932448 10104832  17985702  11270a6 vmlinux

on my build.

Link: http://lkml.kernel.org/r/20130617170211.GA19813@redhat.com
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/trace/ftrace.h
kernel/trace/trace_event_perf.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_syscalls.c
kernel/trace/trace_uprobe.c