예제 #1
0
파일: stat.c 프로젝트: 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;
}
예제 #2
0
파일: counts.c 프로젝트: yejerry/linux
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;
}