diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 3852e2656bb0..1dfb6cc4fdea 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -3710,7 +3710,11 @@ static int __perf_event_overflow(struct perf_event *event, int nmi, | |||
3710 | perf_event_disable(event); | 3710 | perf_event_disable(event); |
3711 | } | 3711 | } |
3712 | 3712 | ||
3713 | perf_event_output(event, nmi, data, regs); | 3713 | if (event->overflow_handler) |
3714 | event->overflow_handler(event, nmi, data, regs); | ||
3715 | else | ||
3716 | perf_event_output(event, nmi, data, regs); | ||
3717 | |||
3714 | return ret; | 3718 | return ret; |
3715 | } | 3719 | } |
3716 | 3720 | ||
@@ -4836,6 +4840,8 @@ inherit_event(struct perf_event *parent_event, | |||
4836 | if (parent_event->attr.freq) | 4840 | if (parent_event->attr.freq) |
4837 | child_event->hw.sample_period = parent_event->hw.sample_period; | 4841 | child_event->hw.sample_period = parent_event->hw.sample_period; |
4838 | 4842 | ||
4843 | child_event->overflow_handler = parent_event->overflow_handler; | ||
4844 | |||
4839 | /* | 4845 | /* |
4840 | * Link it up in the child's context: | 4846 | * Link it up in the child's context: |
4841 | */ | 4847 | */ |