[PATCH v2 2/5]: trace_event: export HZ in timer's tracepoint format

Xiao Guangrong
2009-12-22T13:05:19Z

Export HZ in timer's tracepoint, we can use it to get
TIMER/ITIMER_VIRTUAL/ITIMER_PROF exact latency and it's
suggested by Ingo

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
include/trace/events/timer.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 13ec15a..7749ae5 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -74,14 +74,17 @@ TRACE_EVENT(timer_expire_entry,
TP_STRUCT__entry(
__field( void *, timer )
__field( unsigned long, now )
+ __field( int, hz )
),

TP_fast_assign(
__entry->timer = timer;
__entry->now = jiffies;
+ __entry->hz = HZ;
),

- TP_printk("timer=%p now=%lu", __entry->timer, __entry->now)
+ TP_printk("timer=%p now=%lu HZ=%d", __entry->timer, __entry->now,
+ __entry->hz)
);

/**
--
1.6.1.2