diff options
author | Ian Rogers <irogers@google.com> | 2025-07-24 09:33:02 -0700 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-07-25 10:37:58 -0700 |
commit | 6e19839a80b8713b836722ba9d99a3ab12cfb651 (patch) | |
tree | 4770fc4e27965e19fb86946efc9b5f31a75d8585 /tools/perf/builtin-diff.c | |
parent | a563c9f3bb8c23416f3e72edfbc75d1a4937f7e0 (diff) |
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>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r-- | tools/perf/builtin-diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index ae490d58af92..53d5ea4a6a4f 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -2003,7 +2003,7 @@ int cmd_diff(int argc, const char **argv) sort__mode = SORT_MODE__DIFF; } - if (setup_sorting(NULL) < 0) + if (setup_sorting(/*evlist=*/NULL, perf_session__env(data__files[0].session)) < 0) usage_with_options(diff_usage, options); setup_pager(); |