Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754975AbZGFUNS (ORCPT ); Mon, 6 Jul 2009 16:13:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753216AbZGFUNI (ORCPT ); Mon, 6 Jul 2009 16:13:08 -0400 Received: from www.tglx.de ([62.245.132.106]:45997 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbZGFUNH (ORCPT ); Mon, 6 Jul 2009 16:13:07 -0400 Date: Mon, 6 Jul 2009 22:12:46 +0200 (CEST) From: Thomas Gleixner To: Xiao Guangrong cc: Ingo Molnar , Steven Rostedt , Frederic Weisbecker , Mathieu Desnoyers , Zhaolei , kosaki.motohiro@jp.fujitsu.com, LKML Subject: Re: [PATCH v2 2/3] ftrace: add tracepoint for hrtimer In-Reply-To: <4A51C6AE.5020204@cn.fujitsu.com> Message-ID: References: <4A51C5C2.20802@cn.fujitsu.com> <4A51C6AE.5020204@cn.fujitsu.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1656 Lines: 67 On Mon, 6 Jul 2009, Xiao Guangrong wrote: > +TRACE_EVENT(hrtimer_expire, > + > + TP_PROTO(struct hrtimer *timer, s64 now), > + > + TP_ARGS(timer, now), > + > + TP_STRUCT__entry( > + __field( void *, timer ) > + __field( void *, function ) Again, function is not necessary here. > + __field( s64, now ) > + ), > + > + TP_fast_assign( > + __entry->timer = timer; > + __entry->function = timer->function; > + __entry->now = now; > + ), > + > + TP_printk("timer=%p func=%pf now=%llu", __entry->timer, __entry->function, > + (unsigned long long)__entry->now) > +); > + > +TRACE_EVENT(hrtimer_cancel, > + > + TP_PROTO(struct hrtimer *timer), > + TP_ARGS(timer), > + TP_STRUCT__entry( > + __field( void *, timer ) > + __field( void *, function ) Ditto. > +static inline void debug_and_trace_hrtimer_expire(struct hrtimer *timer, > + s64 now) Technically not necessary. > > + debug_and_trace_hrtimer_expire(timer, basenow.tv64); > __run_hrtimer(timer); Here I'd like to see a callback_done entry as well, so we can check for long lasting callbacks. > } > spin_unlock(&cpu_base->lock); > @@ -1436,6 +1463,7 @@ void hrtimer_run_queues(void) > hrtimer_get_expires_tv64(timer)) > break; > > + debug_and_trace_hrtimer_expire(timer, base->softirq_time.tv64); > __run_hrtimer(timer); Ditto. Thanks, tglx -- 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/