From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965460AbcFMIrR (ORCPT ); Mon, 13 Jun 2016 04:47:17 -0400 Received: from www.linutronix.de ([62.245.132.108]:55233 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964880AbcFMImy (ORCPT ); Mon, 13 Jun 2016 04:42:54 -0400 Message-Id: <20160613075929.016861705@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 13 Jun 2016 08:40:57 -0000 From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Peter Zijlstra , "Paul E. McKenney" , Eric Dumazet , Frederic Weisbecker , Chris Mason , Arjan van de Ven , rt@linutronix.de Subject: [patch 10/20] timer: Add a cascading tracepoint References: <20160613070440.950649741@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=timers--Add-a-cascading-tracepoint.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For analysis of the timer wheel its necessary to trace the cascading. Add a tracepoint. Signed-off-by: Thomas Gleixner Cc: rt@linutronix.de --- include/trace/events/timer.h | 11 +++++++++++ kernel/time/timer.c | 1 + 2 files changed, 12 insertions(+) --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -126,6 +126,17 @@ DEFINE_EVENT(timer_class, timer_cancel, ); /** + * timer_cascade - called when the timer is cascaded + * @timer: pointer to struct timer_list + */ +DEFINE_EVENT(timer_class, timer_cascade, + + TP_PROTO(struct timer_list *timer), + + TP_ARGS(timer) +); + +/** * hrtimer_init - called when the hrtimer is initialized * @hrtimer: pointer to struct hrtimer * @clockid: the hrtimers clock --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1099,6 +1099,7 @@ static int cascade(struct tvec_base *bas * don't have to detach them individually. */ hlist_for_each_entry_safe(timer, tmp, &tv_list, entry) { + trace_timer_cascade(timer); /* No accounting, while moving them */ __internal_add_timer(base, timer); }