aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.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-annotate.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-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 326593862998..5d57d2913f3d 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -947,7 +947,7 @@ int cmd_annotate(int argc, const char **argv)
annotate_opts.show_br_cntr = true;
}
- if (setup_sorting(NULL) < 0)
+ if (setup_sorting(/*evlist=*/NULL, perf_session__env(annotate.session)) < 0)
usage_with_options(annotate_usage, options);
ret = __cmd_annotate(&annotate);