diff options
Diffstat (limited to 'kernel/events/hw_breakpoint.c')
-rw-r--r-- | kernel/events/hw_breakpoint.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c index a64f8aeb5c1f..966a241e8616 100644 --- a/kernel/events/hw_breakpoint.c +++ b/kernel/events/hw_breakpoint.c | |||
@@ -612,6 +612,11 @@ static int hw_breakpoint_add(struct perf_event *bp, int flags) | |||
612 | if (!(flags & PERF_EF_START)) | 612 | if (!(flags & PERF_EF_START)) |
613 | bp->hw.state = PERF_HES_STOPPED; | 613 | bp->hw.state = PERF_HES_STOPPED; |
614 | 614 | ||
615 | if (is_sampling_event(bp)) { | ||
616 | bp->hw.last_period = bp->hw.sample_period; | ||
617 | perf_swevent_set_period(bp); | ||
618 | } | ||
619 | |||
615 | return arch_install_hw_breakpoint(bp); | 620 | return arch_install_hw_breakpoint(bp); |
616 | } | 621 | } |
617 | 622 | ||