lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1380113447-17144-8-git-send-email-jolsa@redhat.com>
Date:	Wed, 25 Sep 2013 14:50:33 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Jiri Olsa <jolsa@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [PATCH 07/21] perf: Toggle whole group in toggle event overflow

Toggling whole group in toggle event overflow,
so we could use the toggling for even groups.

Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 kernel/events/core.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index b41a0d8..2c8ff93 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5267,8 +5267,8 @@ static void perf_log_throttle(struct perf_event *event, int enable)
  * - fix race against other toggler
  * - fix race against other callers of ->stop/start (adjust period/freq)
  */
-static void perf_event_toggle(struct perf_event *event,
-			      enum perf_event_toggle_flag flag)
+static void __perf_event_toggle(struct perf_event *event,
+				enum perf_event_toggle_flag flag)
 {
 	unsigned long flags;
 	bool active;
@@ -5304,6 +5304,16 @@ static void perf_event_toggle(struct perf_event *event,
 	local_irq_restore(flags);
 }
 
+static void perf_event_toggle(struct perf_event *leader,
+			      enum perf_event_toggle_flag flag)
+{
+	struct perf_event *event;
+
+	__perf_event_toggle(leader, flag);
+	list_for_each_entry(event, &leader->sibling_list, group_entry)
+		__perf_event_toggle(event, flag);
+}
+
 static void
 perf_event_toggle_overflow(struct perf_event *event,
 			   struct perf_sample_data *data,
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ