Skip to contentSkip to conversation

perf/core: Don't pass PERF_EF_START to the PMU ->start callback

PATCH New Will Deacon 2 participants 2 messages Aug 15, 2016 – Sep 5, 2016 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/core: Don't pass PERF_EF_START to the PMU ->start callback

PERF_EF_START is a flag to indicate to the PMU ->add callback that, as well as claiming the PMU resources required by the event being added, it should also start the PMU.

Passing this flag to the ->start callback doesn't make sense, because ->start always tries to start the PMU. Remove it.

Cc Peter Zijlstra <[email protected]>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/events/core.c +1 -1
index 1903b8f3a705..b11504376af7 100644
@@ -2455,7 +2455,7 @@ static int __perf_event_stop(void *info)
 	 * while restarting.
 	 */
 	if (sd->restart)
-		event->pmu->start(event, PERF_EF_START);
+		event->pmu->start(event, 0);
 
 	return 0;
 }
Signature · 1 line
2.1.4
#1 lore raw
perf/core: Don't pass PERF_EF_START to the PMU ->start callback
Commit-ID:  c9bbdd4830ab06288bb1d8c00ed8c8c6e80e377a
Gitweb:     http://git.kernel.org/tip/c9bbdd4830ab06288bb1d8c00ed8c8c6e80e377a
Author:     Will Deacon <[email protected]>
AuthorDate: Mon, 15 Aug 2016 11:42:45 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 5 Sep 2016 13:19:18 +0200

perf/core: Don't pass PERF_EF_START to the PMU ->start callback

PERF_EF_START is a flag to indicate to the PMU ->add() callback that, as well as claiming the PMU resources required by the event being added, it should also start the PMU.

Passing this flag to the ->start() callback doesn't make sense, because ->start() always tries to start the PMU. Remove it.

Cc Alexander Shishkin <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/events/core.c +1 -1
index dff00c7..74f22a9 100644
@@ -2492,7 +2492,7 @@ static int __perf_event_stop(void *info)
 	 * while restarting.
 	 */
 	if (sd->restart)
-		event->pmu->start(event, PERF_EF_START);
+		event->pmu->start(event, 0);
 
 	return 0;
 }