lkml.org 
[lkml]   [2009]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2 3/5] trace_event: record task' real_timer in itimer_state tracepoint
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 <xiaoguangrong@cn.fujitsu.com>
---
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 ?
+ &current->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



\
 
 \ /
  Last update: 2009-12-22 14:09    [W:0.125 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site