Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755556Ab3IYMvW (ORCPT ); Wed, 25 Sep 2013 08:51:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9871 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755394Ab3IYMvT (ORCPT ); Wed, 25 Sep 2013 08:51:19 -0400 From: Jiri Olsa To: linux-kernel@vger.kernel.org Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Corey Ashford , Frederic Weisbecker , Ingo Molnar , Paul Mackerras , Peter Zijlstra Subject: [PATCH 07/21] perf: Toggle whole group in toggle event overflow Date: Wed, 25 Sep 2013 14:50:33 +0200 Message-Id: <1380113447-17144-8-git-send-email-jolsa@redhat.com> In-Reply-To: <1380113447-17144-1-git-send-email-jolsa@redhat.com> References: <1380113447-17144-1-git-send-email-jolsa@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1878 Lines: 55 Toggling whole group in toggle event overflow, so we could use the toggling for even groups. Signed-off-by: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/