linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: Fix inheritance of aux_output groups
@ 2019-10-04 12:57 Alexander Shishkin
  2019-10-07 14:49 ` Ingo Molnar
  2019-10-07 14:55 ` [tip: perf/urgent] perf/core: " tip-bot2 for Alexander Shishkin
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Shishkin @ 2019-10-04 12:57 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel, Alexander Shishkin

Commit

  b43762ef010 ("perf: Allow normal events to output AUX data")

forgets to configure aux_output relation in the inherited groups, which
results in child PEBS events forever failing to schedule.

Fix this by setting up the AUX output link in the inheritance path.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
 kernel/events/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index f5bb2557d5f6..761995f21b30 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -12024,6 +12024,10 @@ static int inherit_group(struct perf_event *parent_event,
 					    child, leader, child_ctx);
 		if (IS_ERR(child_ctr))
 			return PTR_ERR(child_ctr);
+
+		if (sub->aux_event == parent_event &&
+		    !perf_get_aux_event(child_ctr, leader))
+			return -EINVAL;
 	}
 	return 0;
 }
-- 
2.23.0


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

end of thread, other threads:[~2019-10-07 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 12:57 [PATCH] perf: Fix inheritance of aux_output groups Alexander Shishkin
2019-10-07 14:49 ` Ingo Molnar
2019-10-07 15:01   ` Alexander Shishkin
2019-10-07 14:55 ` [tip: perf/urgent] perf/core: " tip-bot2 for Alexander Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).