Toggling whole group in toggle event overflow, so we could use the toggling for even groups.
Signed-off-by: Jiri Olsa <jo...@redhat.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Corey Ashford <cjash...@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweis...@gmail.com> Cc: Ingo Molnar <mi...@elte.hu> Cc: Paul Mackerras <pau...@samba.org> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Arnaldo Carvalho de Melo <a...@redhat.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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/