public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able
@ 2015-02-18 17:45 David Ahern
  2015-02-23 16:49 ` David Ahern
  2015-03-27 11:46 ` [tip:perf/core] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able() tip-bot for David Ahern
  0 siblings, 2 replies; 4+ messages in thread
From: David Ahern @ 2015-02-18 17:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: David Ahern, Peter Zijlstra

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 <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 arch/x86/kernel/cpu/perf_event.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index b71a7f86d68a..2d1675816bef 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1033,7 +1033,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
 
 	hwc = &event->hw;
 
-	perf_pmu_disable(event->pmu);
 	n0 = cpuc->n_events;
 	ret = n = collect_events(cpuc, event, false);
 	if (ret < 0)
@@ -1071,7 +1070,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
 
 	ret = 0;
 out:
-	perf_pmu_enable(event->pmu);
 	return ret;
 }
 
-- 
1.9.3 (Apple Git-50)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-27 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 17:45 [PATCH] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able David Ahern
2015-02-23 16:49 ` David Ahern
2015-02-23 17:09   ` Peter Zijlstra
2015-03-27 11:46 ` [tip:perf/core] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able() tip-bot for David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox