perf: Fix inheritance of aux_output groups
Alexander Shishkin
reviewerPATCH 1/1 perf: Fix inheritance of aux_output groups
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.
--- kernel/events/core.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/events/core.c +4 -0
@@ -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 ; }
Signature · 1 line
2.23.0
Quoted 3 lines · Alexander Shishkin
Commit
b43762ef010("perf: Allow normal events to output AUX data")
Missing 'a', the proper SHA1 is:
ab43762ef010 ("perf: Allow normal events to output AUX data")
:-)
Quoted 15 lines
forgets to configure
aux_outputrelation 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 <[email protected]>--- kernel/events/core.c | 4 ++++ 1 file changed, 4 insertions(+)kernel/events/core.c +0
-0
kernel/events/core.c static int inherit_group(struct perf_event *parent_event, · line 12030
Quoted 7 lines
kernel/events/core.c +4
-0@@ -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 ;
Could this explain weird 'perf top' failures I'm seeing on my desktop, which I was just about to debug and report?
Thanks,
Ingo
Alexander Shishkin
reviewerQuoted 11 lines · Ingo Molnar
Quoted 3 lines · Alexander Shishkin
Commit
b43762ef010("perf: Allow normal events to output AUX data")Missing 'a', the proper SHA1 is:
ab43762ef010("perf: Allow normal events to output AUX data"):-)
Ouch, sorry about that.
Quoted 2 lines
Could this explain weird 'perf top' failures I'm seeing on my desktop, which I was just about to debug and report?
Unlikely; to trigger the above you'd have to manually enable the aux_output thingy and that would require HW support to begin with.
Thanks,
--
Alex
[tip: perf/urgent] perf/core: Fix inheritance of aux_output groups
In reply to Alexander ShishkinThe following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: f733c6b508bcaa3441ba1eacf16efb9abd47489f Gitweb: https://git.kernel.org/tip/f733c6b508bcaa3441ba1eacf16efb9abd47489f Author: Alexander Shishkin <[email protected]> AuthorDate: Fri, 04 Oct 2019 15:57:29 +03:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Mon, 07 Oct 2019 16:50:42 +02:00
perf/core: Fix inheritance of aux_output groups
Commit:
ab43762ef010 ("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.
--- kernel/events/core.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/events/core.c +4 -0
@@ -11862,6 +11862,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 ; }