Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759931AbZLOLU5 (ORCPT ); Tue, 15 Dec 2009 06:20:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759906AbZLOLU4 (ORCPT ); Tue, 15 Dec 2009 06:20:56 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:62153 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1759861AbZLOLUz (ORCPT ); Tue, 15 Dec 2009 06:20:55 -0500 Message-ID: <4B2770AD.90005@cn.fujitsu.com> Date: Tue, 15 Dec 2009 19:19:09 +0800 From: Xiao Guangrong User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Ingo Molnar CC: Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Steven Rostedt , LKML Subject: [PATCH 1/4] trace_event: record task' real_timer in itimer_state tracepoint References: <4B27702F.1080507@cn.fujitsu.com> In-Reply-To: <4B27702F.1080507@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/