Skip to content

Commit 9332d25

Browse files
dsahernIngo Molnar
authored andcommitted
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: David Ahern <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 936c663 commit 9332d25

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/x86/kernel/cpu/perf_event.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
10441044

10451045
hwc = &event->hw;
10461046

1047-
perf_pmu_disable(event->pmu);
10481047
n0 = cpuc->n_events;
10491048
ret = n = collect_events(cpuc, event, false);
10501049
if (ret < 0)
@@ -1082,7 +1081,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
10821081

10831082
ret = 0;
10841083
out:
1085-
perf_pmu_enable(event->pmu);
10861084
return ret;
10871085
}
10881086

0 commit comments

Comments
 (0)