aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/evlist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 04acae0ce697..e9d2d5da2fb8 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -222,6 +222,8 @@ void perf_evlist__disable(struct perf_evlist *evlist)
222 222
223 for (cpu = 0; cpu < evlist->cpus->nr; cpu++) { 223 for (cpu = 0; cpu < evlist->cpus->nr; cpu++) {
224 list_for_each_entry(pos, &evlist->entries, node) { 224 list_for_each_entry(pos, &evlist->entries, node) {
225 if (pos->leader)
226 continue;
225 for (thread = 0; thread < evlist->threads->nr; thread++) 227 for (thread = 0; thread < evlist->threads->nr; thread++)
226 ioctl(FD(pos, cpu, thread), 228 ioctl(FD(pos, cpu, thread),
227 PERF_EVENT_IOC_DISABLE, 0); 229 PERF_EVENT_IOC_DISABLE, 0);
@@ -236,6 +238,8 @@ void perf_evlist__enable(struct perf_evlist *evlist)
236 238
237 for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) { 239 for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) {
238 list_for_each_entry(pos, &evlist->entries, node) { 240 list_for_each_entry(pos, &evlist->entries, node) {
241 if (pos->leader)
242 continue;
239 for (thread = 0; thread < evlist->threads->nr; thread++) 243 for (thread = 0; thread < evlist->threads->nr; thread++)
240 ioctl(FD(pos, cpu, thread), 244 ioctl(FD(pos, cpu, thread),
241 PERF_EVENT_IOC_ENABLE, 0); 245 PERF_EVENT_IOC_ENABLE, 0);