]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf parse-events: Corrections to topdown sorting
authorIan Rogers <irogers@google.com>
Fri, 7 Mar 2025 02:39:04 +0000 (18:39 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 12 Mar 2025 02:00:50 +0000 (19:00 -0700)
commit9a1c57fe26f23c4c996c51c5948d727068f306de
tree097d64e02f0a2b5836acc4c047b2849369ce6336
parentb74683b3bb224eccb644cf260753dfc82e802d92
perf parse-events: Corrections to topdown sorting

In the case of '{instructions,slots},faults,topdown-retiring' the
first event that must be grouped, slots, is ignored causing the
topdown-retiring event not to be adjacent to the group it needs to be
inserted into. Don't ignore the group members when computing the
force_grouped_index.

Make the force_grouped_index be for the leader of the group it is
within and always use it first rather than a group leader index so
that topdown events may be sorted from one group into another.

As the PMU name comparison applies to moving events in the same group
ensure the name ordering is always respected.

Change the group splitting logic to not group if there are no other
topdown events and to fix cases where the force group leader wasn't
being grouped with the other members of its group.

Reported-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Closes: https://lore.kernel.org/lkml/20250224083306.71813-2-dapeng1.mi@linux.intel.com/
Closes: https://lore.kernel.org/lkml/f7e4f7e8-748c-4ec7-9088-0e844392c11a@linux.intel.com/
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20250307023906.1135613-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/arch/x86/util/evlist.c
tools/perf/util/parse-events.c