8 #include <linux/coresight-pmu.h> 10 #include "../../util/auxtrace.h" 11 #include "../../util/evlist.h" 12 #include "../../util/pmu.h" 18 struct perf_pmu **arm_spe_pmus = NULL;
19 int ret, i, nr_cpus = sysconf(_SC_NPROCESSORS_CONF);
25 pr_err(
"spes alloc failed\n");
30 for (i = 0; i < nr_cpus; i++) {
33 pr_err(
"sprintf failed\n");
39 if (arm_spe_pmus[*nr_spes]) {
40 pr_debug2(
"%s %d: arm_spe_pmu %d type %d name %s\n",
41 __func__, __LINE__, *nr_spes,
42 arm_spe_pmus[*nr_spes]->
type,
43 arm_spe_pmus[*nr_spes]->
name);
56 bool found_etm =
false;
57 bool found_spe =
false;
58 static struct perf_pmu **arm_spe_pmus = NULL;
59 static int nr_spes = 0;
72 evsel->
attr.type == cs_etm_pmu->
type)
78 for (i = 0; i < nr_spes; i++) {
79 if (evsel->
attr.type == arm_spe_pmus[i]->
type) {
86 if (found_etm && found_spe) {
87 pr_err(
"Concurrent ARM Coresight ETM and SPE operation not currently supported\n");
95 #if defined(__aarch64__) struct auxtrace_record * auxtrace_record__init(struct perf_evlist *evlist, int *err)
#define pr_debug2(fmt,...)
struct auxtrace_record * arm_spe_recording_init(int *err, struct perf_pmu *arm_spe_pmu)
static struct perf_pmu ** find_all_arm_spe_pmus(int *nr_spes, int *err)
#define evlist__for_each_entry(evlist, evsel)
struct perf_pmu * perf_pmu__find(const char *name)
struct auxtrace_record * cs_etm_record_init(int *err)
struct perf_event_attr attr
void static void * zalloc(size_t size)