perf: Reset hwc->last_period on sw clock events
[deliverable/linux.git] / kernel / events / core.c
index b0cd86501c30db1a1320d284f2d52eb1ec499f2b..fa79c377d65dd027946d2bb141fad0893bbc4ee2 100644 (file)
@@ -5647,6 +5647,7 @@ static void perf_swevent_init_hrtimer(struct perf_event *event)
                event->attr.sample_period = NSEC_PER_SEC / freq;
                hwc->sample_period = event->attr.sample_period;
                local64_set(&hwc->period_left, hwc->sample_period);
+               hwc->last_period = hwc->sample_period;
                event->attr.freq = 0;
        }
 }
This page took 0.029249 seconds and 5 git commands to generate.