perf: Optimize perf_output_begin() -- lost_event case
authorPeter Zijlstra <peterz@infradead.org>
Thu, 31 Oct 2013 16:29:29 +0000 (17:29 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Nov 2013 11:34:21 +0000 (12:34 +0100)
commitd20a973f46ed83e0d7d24f6c512064133038e193
tree67480d93b9ed6b23cede1e861aa4daf4bf345782
parent85f59edf9684603026c64c902791748116d29478
perf: Optimize perf_output_begin() -- lost_event case

Avoid touching the lost_event and sample_data cachelines twince. Its
not like we end up doing less work, but it might help to keep all
accesses to these cachelines in one place.

Due to code shuffle, this looses 4 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-zfxnc58qxj0eawdoj31hhupv@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/ring_buffer.c