提交 3fe4430d 编写于 作者: J Jiri Olsa 提交者: Arnaldo Carvalho de Melo

perf tools: Omit group members from perf_evlist__disable/enable

There's no need to disable/enable ordinary group member events,
because they are initialy enabled and get scheduled by the leader.
Signed-off-by: NJiri Olsa <jolsa@redhat.com>
Acked-by: NNamhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352741644-16809-5-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 2711926a
...@@ -222,6 +222,8 @@ void perf_evlist__disable(struct perf_evlist *evlist) ...@@ -222,6 +222,8 @@ void perf_evlist__disable(struct perf_evlist *evlist)
for (cpu = 0; cpu < evlist->cpus->nr; cpu++) { for (cpu = 0; cpu < evlist->cpus->nr; cpu++) {
list_for_each_entry(pos, &evlist->entries, node) { list_for_each_entry(pos, &evlist->entries, node) {
if (pos->leader)
continue;
for (thread = 0; thread < evlist->threads->nr; thread++) for (thread = 0; thread < evlist->threads->nr; thread++)
ioctl(FD(pos, cpu, thread), ioctl(FD(pos, cpu, thread),
PERF_EVENT_IOC_DISABLE, 0); PERF_EVENT_IOC_DISABLE, 0);
...@@ -236,6 +238,8 @@ void perf_evlist__enable(struct perf_evlist *evlist) ...@@ -236,6 +238,8 @@ void perf_evlist__enable(struct perf_evlist *evlist)
for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) { for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) {
list_for_each_entry(pos, &evlist->entries, node) { list_for_each_entry(pos, &evlist->entries, node) {
if (pos->leader)
continue;
for (thread = 0; thread < evlist->threads->nr; thread++) for (thread = 0; thread < evlist->threads->nr; thread++)
ioctl(FD(pos, cpu, thread), ioctl(FD(pos, cpu, thread),
PERF_EVENT_IOC_ENABLE, 0); PERF_EVENT_IOC_ENABLE, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册