提交 9332d250 编写于 作者: D David Ahern 提交者: Ingo Molnar

perf/x86: Remove redundant calls to perf_pmu_{dis|en}able()

perf_pmu_disable() is called before pmu->add() and perf_pmu_enable() is called
afterwards. No need to call these inside of x86_pmu_add() as well.
Signed-off-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1424281543-67335-1-git-send-email-dsahern@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 936c663a
...@@ -1044,7 +1044,6 @@ static int x86_pmu_add(struct perf_event *event, int flags) ...@@ -1044,7 +1044,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
hwc = &event->hw; hwc = &event->hw;
perf_pmu_disable(event->pmu);
n0 = cpuc->n_events; n0 = cpuc->n_events;
ret = n = collect_events(cpuc, event, false); ret = n = collect_events(cpuc, event, false);
if (ret < 0) if (ret < 0)
...@@ -1082,7 +1081,6 @@ static int x86_pmu_add(struct perf_event *event, int flags) ...@@ -1082,7 +1081,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
ret = 0; ret = 0;
out: out:
perf_pmu_enable(event->pmu);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册