perf sort: Use perf_env to set arch sort keys and header
authorIan Rogers <irogers@google.com>
Thu, 24 Jul 2025 16:33:02 +0000 (09:33 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 25 Jul 2025 17:37:58 +0000 (10:37 -0700)
commit6e19839a80b8713b836722ba9d99a3ab12cfb651
tree4770fc4e27965e19fb86946efc9b5f31a75d8585
parenta563c9f3bb8c23416f3e72edfbc75d1a4937f7e0
perf sort: Use perf_env to set arch sort keys and header

Previously arch_support_sort_key and arch_perf_header_entry used a
weak symbol to compile as appropriate for x86 and powerpc. A
limitation to this is that the handling of a data file could vary in
cross-platform development. Change to using the perf_env of the
current session to determine the architecture kind and set the sort
key and header entries as appropriate.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-23-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
15 files changed:
tools/perf/arch/powerpc/util/Build
tools/perf/arch/powerpc/util/event.c [deleted file]
tools/perf/arch/x86/util/event.c
tools/perf/builtin-annotate.c
tools/perf/builtin-c2c.c
tools/perf/builtin-diff.c
tools/perf/builtin-report.c
tools/perf/builtin-top.c
tools/perf/tests/hists_cumulate.c
tools/perf/tests/hists_filter.c
tools/perf/tests/hists_link.c
tools/perf/tests/hists_output.c
tools/perf/util/event.h
tools/perf/util/sort.c
tools/perf/util/sort.h