Lines Matching refs:counts
10 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local
12 if (counts) { in perf_counts__new()
17 free(counts); in perf_counts__new()
21 counts->values = values; in perf_counts__new()
25 xyarray__delete(counts->values); in perf_counts__new()
26 free(counts); in perf_counts__new()
30 counts->loaded = values; in perf_counts__new()
33 return counts; in perf_counts__new()
36 void perf_counts__delete(struct perf_counts *counts) in perf_counts__delete() argument
38 if (counts) { in perf_counts__delete()
39 xyarray__delete(counts->loaded); in perf_counts__delete()
40 xyarray__delete(counts->values); in perf_counts__delete()
41 free(counts); in perf_counts__delete()
45 static void perf_counts__reset(struct perf_counts *counts) in perf_counts__reset() argument
47 xyarray__reset(counts->loaded); in perf_counts__reset()
48 xyarray__reset(counts->values); in perf_counts__reset()
53 perf_counts__reset(evsel->counts); in perf_evsel__reset_counts()
58 evsel->counts = perf_counts__new(ncpus, nthreads); in perf_evsel__alloc_counts()
59 return evsel->counts != NULL ? 0 : -ENOMEM; in perf_evsel__alloc_counts()
64 perf_counts__delete(evsel->counts); in perf_evsel__free_counts()
65 evsel->counts = NULL; in perf_evsel__free_counts()