diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 2 |
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) | |||
442 | struct hw_perf_event *hwc = &event->hw; | 442 | struct hw_perf_event *hwc = &event->hw; |
443 | u64 config; | 443 | u64 config; |
444 | 444 | ||
445 | if (!hwc->sample_period) { | 445 | if (!is_sampling_event(event)) { |
446 | hwc->sample_period = x86_pmu.max_period; | 446 | hwc->sample_period = x86_pmu.max_period; |
447 | hwc->last_period = hwc->sample_period; | 447 | hwc->last_period = hwc->sample_period; |
448 | local64_set(&hwc->period_left, hwc->sample_period); | 448 | local64_set(&hwc->period_left, hwc->sample_period); |