aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r--tools/perf/util/evlist.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index b021ea9265c3..e03e7bc8205e 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -91,6 +91,19 @@ int perf_evlist__add_default(struct perf_evlist *evlist)
91 return 0; 91 return 0;
92} 92}
93 93
94void perf_evlist__disable(struct perf_evlist *evlist)
95{
96 int cpu, thread;
97 struct perf_evsel *pos;
98
99 for (cpu = 0; cpu < evlist->cpus->nr; cpu++) {
100 list_for_each_entry(pos, &evlist->entries, node) {
101 for (thread = 0; thread < evlist->threads->nr; thread++)
102 ioctl(FD(pos, cpu, thread), PERF_EVENT_IOC_DISABLE);
103 }
104 }
105}
106
94int perf_evlist__alloc_pollfd(struct perf_evlist *evlist) 107int perf_evlist__alloc_pollfd(struct perf_evlist *evlist)
95{ 108{
96 int nfds = evlist->cpus->nr * evlist->threads->nr * evlist->nr_entries; 109 int nfds = evlist->cpus->nr * evlist->threads->nr * evlist->nr_entries;