From: Ingo Molnar Date: Tue, 5 Oct 2010 07:47:14 +0000 (+0200) Subject: Merge branch 'perf/urgent' into perf/core X-Git-Tag: v4.13~17191^2~30 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=00e8976200665eec2fa9264d61885b4d1384d4f0;p=mirror_ubuntu-bionic-kernel.git Merge branch 'perf/urgent' into perf/core Conflicts: tools/perf/util/ui/browsers/hists.c Merge reason: fix the conflict and merge in changes for dependent patch. Signed-off-by: Ingo Molnar --- 00e8976200665eec2fa9264d61885b4d1384d4f0 diff --cc arch/x86/kernel/cpu/perf_event.c index 0fb17050360f,03a5b0385ad6..6526a86616a7 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@@ -1019,23 -1005,23 +1020,24 @@@ static void x86_pmu_start(struct perf_e struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); int idx = event->hw.idx; - if (idx == -1) - return -EAGAIN; + if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED))) + return; + + if (WARN_ON_ONCE(idx == -1)) + return; + + if (flags & PERF_EF_RELOAD) { + WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE)); + x86_perf_event_set_period(event); + } + + event->hw.state = 0; - x86_perf_event_set_period(event); cpuc->events[idx] = event; __set_bit(idx, cpuc->active_mask); + __set_bit(idx, cpuc->running); x86_pmu.enable(event); perf_event_update_userpage(event); - - return 0; -} - -static void x86_pmu_unthrottle(struct perf_event *event) -{ - int ret = x86_pmu_start(event); - WARN_ON_ONCE(ret); } void perf_event_print_debug(void)