perf: Simplify the ring-buffer code
authorPeter Zijlstra <peterz@infradead.org>
Thu, 31 Oct 2013 09:19:59 +0000 (10:19 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Nov 2013 11:34:18 +0000 (12:34 +0100)
commit26c86da8821f7b64fced498674990318bc34c8de
tree140d2b7c5f0e6e5afd106d3e76793d2be64e8592
parent83bf9702c876a54e4e4d1735f9c8680a72421fbe
perf: Simplify the ring-buffer code

By using CIRC_SPACE() we can obviate the need for perf_output_space().

Shrinks the size of perf_output_begin() by 17 bytes on
x86_64-defconfig.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Michael Neuling <mikey@neuling.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: james.hogan@imgtec.com
Cc: Vince Weaver <vince@deater.net>
Cc: Victor Kaplansky <VICTORK@il.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Anton Blanchard <anton@samba.org>
Link: http://lkml.kernel.org/n/tip-vtb0xb0llebmsdlfn1v5vtfj@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/ring_buffer.c