Lines Matching full:counts
6 #include "counts.h"
12 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local
14 if (counts) { in perf_counts__new()
19 free(counts); in perf_counts__new()
23 counts->values = values; in perf_counts__new()
27 xyarray__delete(counts->values); in perf_counts__new()
28 free(counts); in perf_counts__new()
32 counts->loaded = values; in perf_counts__new()
35 return counts; in perf_counts__new()
38 void perf_counts__delete(struct perf_counts *counts) in perf_counts__delete() argument
40 if (counts) { in perf_counts__delete()
41 xyarray__delete(counts->loaded); in perf_counts__delete()
42 xyarray__delete(counts->values); in perf_counts__delete()
43 free(counts); in perf_counts__delete()
47 void perf_counts__reset(struct perf_counts *counts) in perf_counts__reset() argument
49 xyarray__reset(counts->loaded); in perf_counts__reset()
50 xyarray__reset(counts->values); in perf_counts__reset()
55 perf_counts__reset(evsel->counts); in evsel__reset_counts()
63 evsel->counts = perf_counts__new(perf_cpu_map__nr(cpus), nthreads); in evsel__alloc_counts()
64 return evsel->counts != NULL ? 0 : -ENOMEM; in evsel__alloc_counts()
69 perf_counts__delete(evsel->counts); in evsel__free_counts()
70 evsel->counts = NULL; in evsel__free_counts()