tools/perf/util/parse-events.c | 58 +++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 22 deletions(-)
Patch 1, fix: perf stat -e cycles,slots,topdown-fe-bound so that cycles isn't made a group leader (failure caused by PMUs matching). Previously this event list would fail so not necessarily a regression over previous perf release. Patch 2, when regrouping events the leader needs to be updated due to sorting. This fix causes larger event groups that then regress at least the tigerlake metric test as the kernel PMU driver fails to break the weak groups. This is a fix for a bug but the consequence of fixing the bug is to make a passing test fail due to the kernel PMU driver. Patch 3, don't alter the list position of events without a group if they don't need forcing into a group. Analysis showed this was the cause of the issue reported by Andi Kleen: https://lore.kernel.org/linux-perf-users/ZLBgbHkbrfGygM%2Fu@tassilo/ Due to the test regression in patch 2, follow up patches may be necessary for Icelake+ Intel vendor metrics to add METRIC_NO_GROUP to avoid the kernel PMU driver issue. Ian Rogers (3): perf parse-events: Extra care around force grouped events perf parse-events: When fixing group leaders always set the leader perf parse-events: Only move force grouped evsels when sorting tools/perf/util/parse-events.c | 58 +++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 22 deletions(-) -- 2.41.0.487.g6d72f3e995-goog
Em Tue, Jul 18, 2023 at 05:18:33PM -0700, Ian Rogers escreveu: > Patch 1, fix: > perf stat -e cycles,slots,topdown-fe-bound > so that cycles isn't made a group leader (failure caused by PMUs > matching). Previously this event list would fail so not necessarily a > regression over previous perf release. > > Patch 2, when regrouping events the leader needs to be updated due to > sorting. This fix causes larger event groups that then regress at > least the tigerlake metric test as the kernel PMU driver fails to > break the weak groups. This is a fix for a bug but the consequence of > fixing the bug is to make a passing test fail due to the kernel PMU > driver. > > Patch 3, don't alter the list position of events without a group if > they don't need forcing into a group. Analysis showed this was the > cause of the issue reported by Andi Kleen: > https://lore.kernel.org/linux-perf-users/ZLBgbHkbrfGygM%2Fu@tassilo/ Andi, Can you please check these patches and provide a Tested-by? Thanks, - Arnaldo > Due to the test regression in patch 2, follow up patches may be > necessary for Icelake+ Intel vendor metrics to add METRIC_NO_GROUP to > avoid the kernel PMU driver issue. > > Ian Rogers (3): > perf parse-events: Extra care around force grouped events > perf parse-events: When fixing group leaders always set the leader > perf parse-events: Only move force grouped evsels when sorting > > tools/perf/util/parse-events.c | 58 +++++++++++++++++++++------------- > 1 file changed, 36 insertions(+), 22 deletions(-) > > -- > 2.41.0.487.g6d72f3e995-goog
On Wed, Jul 19, 2023 at 11:49:47AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Jul 18, 2023 at 05:18:33PM -0700, Ian Rogers escreveu: > > Patch 1, fix: > > perf stat -e cycles,slots,topdown-fe-bound > > so that cycles isn't made a group leader (failure caused by PMUs > > matching). Previously this event list would fail so not necessarily a > > regression over previous perf release. > > > > Patch 2, when regrouping events the leader needs to be updated due to > > sorting. This fix causes larger event groups that then regress at > > least the tigerlake metric test as the kernel PMU driver fails to > > break the weak groups. This is a fix for a bug but the consequence of > > fixing the bug is to make a passing test fail due to the kernel PMU > > driver. > > > > Patch 3, don't alter the list position of events without a group if > > they don't need forcing into a group. Analysis showed this was the > > cause of the issue reported by Andi Kleen: > > https://lore.kernel.org/linux-perf-users/ZLBgbHkbrfGygM%2Fu@tassilo/ > > Andi, > > Can you please check these patches and provide a Tested-by? Tested-by: Andi Kleen <ak@linux.intel.com> -Andi
On Wed, Jul 19, 2023 at 7:49 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > Em Tue, Jul 18, 2023 at 05:18:33PM -0700, Ian Rogers escreveu: > > Patch 1, fix: > > perf stat -e cycles,slots,topdown-fe-bound > > so that cycles isn't made a group leader (failure caused by PMUs > > matching). Previously this event list would fail so not necessarily a > > regression over previous perf release. > > > > Patch 2, when regrouping events the leader needs to be updated due to > > sorting. This fix causes larger event groups that then regress at > > least the tigerlake metric test as the kernel PMU driver fails to > > break the weak groups. This is a fix for a bug but the consequence of > > fixing the bug is to make a passing test fail due to the kernel PMU > > driver. > > > > Patch 3, don't alter the list position of events without a group if > > they don't need forcing into a group. Analysis showed this was the > > cause of the issue reported by Andi Kleen: > > https://lore.kernel.org/linux-perf-users/ZLBgbHkbrfGygM%2Fu@tassilo/ > > Andi, > > Can you please check these patches and provide a Tested-by? I think we should be aiming to get these fixes/changes into Linux 6.5 and it's a shame this didn't happen last week. Feedback appreciated. Thanks, Ian > Thanks, > > - Arnaldo > > > Due to the test regression in patch 2, follow up patches may be > > necessary for Icelake+ Intel vendor metrics to add METRIC_NO_GROUP to > > avoid the kernel PMU driver issue. > > > > Ian Rogers (3): > > perf parse-events: Extra care around force grouped events > > perf parse-events: When fixing group leaders always set the leader > > perf parse-events: Only move force grouped evsels when sorting > > > > tools/perf/util/parse-events.c | 58 +++++++++++++++++++++------------- > > 1 file changed, 36 insertions(+), 22 deletions(-) > > > > -- > > 2.41.0.487.g6d72f3e995-goog
What's the status of this patch kit ? I don't see it in perf-tools-next It should be applied to any branches that have the original problem. Thanks, -Andi
> > Andi, > > > > Can you please check these patches and provide a Tested-by? > > I think we should be aiming to get these fixes/changes into Linux 6.5 > and it's a shame this didn't happen last week. Feedback appreciated. Sorry for the delay, I was finally able to test them now and they resolve my issues. Thanks Tested-by: Andi Kleen <ak@linux.intel.com> -Andi
> > Andi, > > > > Can you please check these patches and provide a Tested-by? > > I think we should be aiming to get these fixes/changes into Linux 6.5 > and it's a shame this didn't happen last week. Feedback appreciated. Sorry was on vacation. Will test right now. -Andi
© 2016 - 2026 Red Hat, Inc.