static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel, int ncpus, int nthreads) { struct perf_counts *counts; counts = perf_counts__new(ncpus, nthreads); if (counts) evsel->prev_raw_counts = counts; return counts ? 0 : -ENOMEM; }
int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus, int nthreads) { evsel->counts = perf_counts__new(ncpus, nthreads); return evsel->counts != NULL ? 0 : -ENOMEM; }