Example #1
0
File: stat.c Project: 020gzh/linux
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;
}
Example #2
0
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;
}