x86, perf_counter, bts: Optimize BTS overflow handling
authorMarkus Metzger <markus.t.metzger@intel.com>
Tue, 15 Sep 2009 11:00:23 +0000 (13:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 18 Sep 2009 18:43:20 +0000 (20:43 +0200)
commit5622f295b53fb60dbf9bed3e2c89d182490a8b7f
tree8279554bddd1607d53dc06e97f4b5a1d0c085ccd
parent4b77a7297795229eca96c41e1709a3c87909fabe
x86, perf_counter, bts: Optimize BTS overflow handling

Draining the BTS buffer on a buffer overflow interrupt takes too
long resulting in a kernel lockup when tracing the kernel.

Restructure perf_counter sampling into sample creation and sample
output.

Prepare a single reference sample for BTS sampling and update the
from and to address fields when draining the BTS buffer. Drain the
entire BTS buffer between a single perf_output_begin() /
perf_output_end() pair.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090915130023.A16204@sedona.ch.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_counter.c
include/linux/perf_counter.h
kernel/perf_counter.c