Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836AbZLVNG3 (ORCPT ); Tue, 22 Dec 2009 08:06:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751053AbZLVNG2 (ORCPT ); Tue, 22 Dec 2009 08:06:28 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:57490 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750931AbZLVNG1 (ORCPT ); Tue, 22 Dec 2009 08:06:27 -0500 Message-ID: <4B30C3E7.5040401@cn.fujitsu.com> Date: Tue, 22 Dec 2009 21:04:39 +0800 From: Xiao Guangrong User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Ingo Molnar CC: Frederic Weisbecker , Thomas Gleixner , Peter Zijlstra , Steven Rostedt , Paul Mackerras , LKML Subject: [PATCH v2 3/5] trace_event: record task' real_timer in itimer_state tracepoint References: <4B27702F.1080507@cn.fujitsu.com> <20091215142325.GC5833@nowhere> <4B30C2D1.4030006@cn.fujitsu.com> In-Reply-To: <4B30C2D1.4030006@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1789 Lines: 51 When itimer is ITIMER_REAL, we should cooperate with hrtimer's tracepoit to get it's latency, this patch can let us get itimer's hrtimer easy Signed-off-by: Xiao Guangrong --- include/trace/events/timer.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 9496b96..13ec15a 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -285,6 +285,7 @@ TRACE_EVENT(itimer_state, TP_STRUCT__entry( __field( int, which ) + __field( void *, timer ) __field( cputime_t, expires ) __field( long, value_sec ) __field( long, value_usec ) @@ -294,6 +295,8 @@ TRACE_EVENT(itimer_state, TP_fast_assign( __entry->which = which; + __entry->timer = which == ITIMER_REAL ? + ¤t->signal->real_timer : NULL; __entry->expires = expires; __entry->value_sec = value->it_value.tv_sec; __entry->value_usec = value->it_value.tv_usec; @@ -301,8 +304,9 @@ TRACE_EVENT(itimer_state, __entry->interval_usec = value->it_interval.tv_usec; ), - TP_printk("which=%d expires=%llu it_value=%ld.%ld it_interval=%ld.%ld", - __entry->which, (unsigned long long)__entry->expires, + TP_printk("which=%d timer=%p expires=%llu it_value=%ld.%ld it_interval=" + "%ld.%ld", __entry->which, __entry->timer, + (unsigned long long)__entry->expires, __entry->value_sec, __entry->value_usec, __entry->interval_sec, __entry->interval_usec) ); -- 1.6.1.2 -- 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/