|
|
@@ -991,6 +991,16 @@ int perf_evsel__enable(struct perf_evsel *evsel)
|
|
|
0);
|
|
|
}
|
|
|
|
|
|
+int perf_evsel__disable(struct perf_evsel *evsel)
|
|
|
+{
|
|
|
+ int nthreads = thread_map__nr(evsel->threads);
|
|
|
+ int ncpus = cpu_map__nr(evsel->cpus);
|
|
|
+
|
|
|
+ return perf_evsel__run_ioctl(evsel, ncpus, nthreads,
|
|
|
+ PERF_EVENT_IOC_DISABLE,
|
|
|
+ 0);
|
|
|
+}
|
|
|
+
|
|
|
int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads)
|
|
|
{
|
|
|
if (ncpus == 0 || nthreads == 0)
|