]> Git Repo - linux.git/commit
perf/x86/intel: Use the PEBS auto reload mechanism when possible
authorYan, Zheng <[email protected]>
Wed, 6 May 2015 19:33:47 +0000 (15:33 -0400)
committerIngo Molnar <[email protected]>
Sun, 7 Jun 2015 14:08:35 +0000 (16:08 +0200)
commit851559e35fd5ab637783ba395e55edd50f761229
tree7472cbc458ca562db11236e8d53bc06e82998d96
parent5b68164d6a1fdbe02b30bd777d1f686c6d901f28
perf/x86/intel: Use the PEBS auto reload mechanism when possible

When a fixed period is specified, this patch makes perf use the PEBS
auto reload mechanism. This makes normal profiling faster, because
it avoids one costly MSR write in the PMI handler.

However, the reset value will be loaded by hardware assist. There is a
small delay compared to the previous non-auto-reload mechanism. The
delay time is arbitrary, but very small. The assist cost is 400-800
cycles, assuming common cases with everything cached. The minimum period
the patch currently uses is 10000. In that extreme case it can be ~10%
if cycles are used.

Signed-off-by: Yan, Zheng <[email protected]>
Signed-off-by: Kan Liang <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event.h
arch/x86/kernel/cpu/perf_event_intel.c
arch/x86/kernel/cpu/perf_event_intel_ds.c
This page took 0.056489 seconds and 4 git commands to generate.