aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2025-07-24 16:33:02 +0000
committerNamhyung Kim <[email protected]>2025-07-25 17:37:58 +0000
commit6e19839a80b8713b836722ba9d99a3ab12cfb651 (patch)
tree4770fc4e27965e19fb86946efc9b5f31a75d8585 /tools/perf/builtin-diff.c
parentperf test: Move PERF_SAMPLE_WEIGHT_STRUCT parsing to common test (diff)
downloadkernel-6e19839a80b8713b836722ba9d99a3ab12cfb651.tar.gz
kernel-6e19839a80b8713b836722ba9d99a3ab12cfb651.zip
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c2
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();