Lines Matching full:counts
6 #include "counts.h"
11 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local
13 if (counts) { in perf_counts__new()
18 free(counts); in perf_counts__new()
22 counts->values = values; in perf_counts__new()
26 xyarray__delete(counts->values); in perf_counts__new()
27 free(counts); in perf_counts__new()
31 counts->loaded = values; in perf_counts__new()
34 return counts; in perf_counts__new()
37 void perf_counts__delete(struct perf_counts *counts) in perf_counts__delete() argument
39 if (counts) { in perf_counts__delete()
40 xyarray__delete(counts->loaded); in perf_counts__delete()
41 xyarray__delete(counts->values); in perf_counts__delete()
42 free(counts); in perf_counts__delete()
46 void perf_counts__reset(struct perf_counts *counts) in perf_counts__reset() argument
48 xyarray__reset(counts->loaded); in perf_counts__reset()
49 xyarray__reset(counts->values); in perf_counts__reset()
50 memset(&counts->aggr, 0, sizeof(struct perf_counts_values)); in perf_counts__reset()
55 perf_counts__reset(evsel->counts); in evsel__reset_counts()
60 evsel->counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_counts()
61 return evsel->counts != NULL ? 0 : -ENOMEM; in evsel__alloc_counts()
66 perf_counts__delete(evsel->counts); in evsel__free_counts()
67 evsel->counts = NULL; in evsel__free_counts()