From bb3b2cfeb206f5b10b859e134651b54120e3f530 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 30 Jun 2026 18:05:56 +0100 Subject: ARM: 9480/1: entry: expand comment in __switch_to As per discussion between the developers in the mail thread linked, expand the comment in __switch_to so that readers of the code understand what is going on. Suggested-by: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Linus Walleij > Signed-off-by: Russell King --- tools/perf/util/sample-raw.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tools/perf/util/sample-raw.c (limited to 'tools/perf/util/sample-raw.c') diff --git a/tools/perf/util/sample-raw.c b/tools/perf/util/sample-raw.c new file mode 100644 index 000000000..bcf442574 --- /dev/null +++ b/tools/perf/util/sample-raw.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#include +#include +#include "evlist.h" +#include "env.h" +#include "header.h" +#include "sample-raw.h" +#include "session.h" + +/* + * Check platform the perf data file was created on and perform platform + * specific interpretation. + */ +void evlist__init_trace_event_sample_raw(struct evlist *evlist, struct perf_env *env) +{ + const char *arch_pf = perf_env__arch(env); + const char *cpuid = perf_env__cpuid(env); + + if (arch_pf && !strcmp("s390", arch_pf)) + evlist->trace_event_sample_raw = evlist__s390_sample_raw; + else if (arch_pf && !strcmp("x86", arch_pf) && + cpuid && strstarts(cpuid, "AuthenticAMD") && + evlist__has_amd_ibs(evlist)) { + evlist->trace_event_sample_raw = evlist__amd_sample_raw; + } +} -- cgit v1.3.1