summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2010-11-23 16:21:43 +0100
committerIngo Molnar <mingo@elte.hu>2010-11-26 15:14:54 +0100
commit6c7e550f13f8ad82efb6a5653ae628c2543c1768 (patch)
tree1c994b999648fbe51ffe4312e2d6827aedd5f012 /arch/x86/kernel
parentscripts/tags.sh: Add magic for trace-events (diff)
downloadlinux-6c7e550f13f8ad82efb6a5653ae628c2543c1768.tar.xz
linux-6c7e550f13f8ad82efb6a5653ae628c2543c1768.zip
perf: Introduce is_sampling_event()
and use it when appropriate. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1290525705-6265-1-git-send-email-fbuihuu@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 7c1a4c35fd41..c01dfec635db 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -442,7 +442,7 @@ static int x86_setup_perfctr(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
u64 config;
- if (!hwc->sample_period) {
+ if (!is_sampling_event(event)) {
hwc->sample_period = x86_pmu.max_period;
hwc->last_period = hwc->sample_period;
local64_set(&hwc->period_left, hwc->sample_period);