[PATCH v3 2/5] trace_event: record task' real_timer in itimer_statetracepoint

From: Xiao Guangrong
Date: Tue Dec 29 2009 - 00:23:22 EST


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@xxxxxxxxxxxxxx>
---
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/