All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <jolsa@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
	namhyung@kernel.org, jolsa@redhat.com, fweisbec@gmail.com,
	tglx@linutronix.de, cjashfor@linux.vnet.ibm.com, mingo@elte.hu
Subject: [tip:perf/core] perf tools: Omit group members from perf_evlist__disable/enable
Date: Sat, 8 Dec 2012 06:59:42 -0800	[thread overview]
Message-ID: <tip-3fe4430dd66837d8fcdb63c167e908655fc842e3@git.kernel.org> (raw)
In-Reply-To: <1352741644-16809-5-git-send-email-jolsa@redhat.com>

Commit-ID:  3fe4430dd66837d8fcdb63c167e908655fc842e3
Gitweb:     http://git.kernel.org/tip/3fe4430dd66837d8fcdb63c167e908655fc842e3
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Mon, 12 Nov 2012 18:34:03 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 14 Nov 2012 16:52:15 -0300

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: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evlist.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 04acae0..e9d2d5d 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)
 
 	for (cpu = 0; cpu < evlist->cpus->nr; cpu++) {
 		list_for_each_entry(pos, &evlist->entries, node) {
+			if (pos->leader)
+				continue;
 			for (thread = 0; thread < evlist->threads->nr; thread++)
 				ioctl(FD(pos, cpu, thread),
 				      PERF_EVENT_IOC_DISABLE, 0);
@@ -236,6 +238,8 @@ void perf_evlist__enable(struct perf_evlist *evlist)
 
 	for (cpu = 0; cpu < cpu_map__nr(evlist->cpus); cpu++) {
 		list_for_each_entry(pos, &evlist->entries, node) {
+			if (pos->leader)
+				continue;
 			for (thread = 0; thread < evlist->threads->nr; thread++)
 				ioctl(FD(pos, cpu, thread),
 				      PERF_EVENT_IOC_ENABLE, 0);

  reply	other threads:[~2012-12-08 15:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 17:33 [PATCH 0/5] perf tool: Fix enable/disable events logic for record command Jiri Olsa
2012-11-12 17:34 ` [PATCH 1/5] perf tool: Fix attributes for '{}' defined event groups Jiri Olsa
2012-12-08 14:56   ` [tip:perf/core] perf tools: " tip-bot for Jiri Olsa
2012-11-12 17:34 ` [PATCH 2/5] perf tool: Fix 'disabled' attribute config for record command Jiri Olsa
2012-12-08 14:57   ` [tip:perf/core] perf tools: " tip-bot for Jiri Olsa
2012-11-12 17:34 ` [PATCH 3/5] perf tool: Ensure single disable call per event in record comand Jiri Olsa
2012-12-08 14:58   ` [tip:perf/core] perf tools: " tip-bot for Jiri Olsa
2012-11-12 17:34 ` [PATCH 4/5] perf tool: Omit group members from perf_evlist__disable/enable Jiri Olsa
2012-12-08 14:59   ` tip-bot for Jiri Olsa [this message]
2012-11-12 17:34 ` [PATCH 5/5] perf tool: Add basic event modifier sanity check Jiri Olsa
2012-11-13  2:22   ` Namhyung Kim
2012-11-13 14:32     ` [PATCHv2 " Jiri Olsa
2012-12-08 15:00       ` [tip:perf/core] perf tools: " tip-bot for Jiri Olsa
2012-11-13  2:26 ` [PATCH 0/5] perf tool: Fix enable/disable events logic for record command Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-3fe4430dd66837d8fcdb63c167e908655fc842e3@git.kernel.org \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.