0001
0002
0003 #include <string.h>
0004 #include <linux/string.h>
0005 #include "evlist.h"
0006 #include "env.h"
0007 #include "header.h"
0008 #include "sample-raw.h"
0009
0010
0011
0012
0013
0014 void evlist__init_trace_event_sample_raw(struct evlist *evlist)
0015 {
0016 const char *arch_pf = perf_env__arch(evlist->env);
0017 const char *cpuid = perf_env__cpuid(evlist->env);
0018
0019 if (arch_pf && !strcmp("s390", arch_pf))
0020 evlist->trace_event_sample_raw = evlist__s390_sample_raw;
0021 else if (arch_pf && !strcmp("x86", arch_pf) &&
0022 cpuid && strstarts(cpuid, "AuthenticAMD") &&
0023 evlist__has_amd_ibs(evlist)) {
0024 evlist->trace_event_sample_raw = evlist__amd_sample_raw;
0025 }
0026 }