at master 769 B view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#include <string.h> 4#include <linux/string.h> 5#include "evlist.h" 6#include "env.h" 7#include "header.h" 8#include "sample-raw.h" 9#include "session.h" 10 11/* 12 * Check platform the perf data file was created on and perform platform 13 * specific interpretation. 14 */ 15void evlist__init_trace_event_sample_raw(struct evlist *evlist, struct perf_env *env) 16{ 17 const char *arch_pf = perf_env__arch(env); 18 const char *cpuid = perf_env__cpuid(env); 19 20 if (arch_pf && !strcmp("s390", arch_pf)) 21 evlist->trace_event_sample_raw = evlist__s390_sample_raw; 22 else if (arch_pf && !strcmp("x86", arch_pf) && 23 cpuid && strstarts(cpuid, "AuthenticAMD") && 24 evlist__has_amd_ibs(evlist)) { 25 evlist->trace_event_sample_raw = evlist__amd_sample_raw; 26 } 27}