aboutsummaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2011-03-16 19:04:32 -0400
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2011-03-16 19:04:32 -0400
commit42558e52f43aa1be99dcc7c1a74bc8b57bcfdf11 (patch)
tree8105edd15b6da72d73da82491e96faf69f53e91e /include/trace
parentf71f887233ec1cd125f1ee961ec5ebec74def182 (diff)
lttng-instrumentation/lttng-instrumentation-timer
LTTng instrumentation - timer Instrument timer activity (timer set, expired, current time updates) to keep information about the "real time" flow within the kernel. It can be used by a trace analysis tool to synchronize information coming from various sources, e.g. to merge traces with system logs. Those tracepoints are used by LTTng. About the performance impact of tracepoints (which is comparable to markers), even without immediate values optimizations, tests done by Hideo Aoki on ia64 show no regression. His test case was using hackbench on a kernel where scheduler instrumentation (about 5 events in code scheduler code) was added. See the "Tracepoints" patch header for performance result detail. Note : do_setitimer instrumentation could potentially be done with a more generic system call instrumentation. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: 'Ingo Molnar' <mingo@elte.hu> CC: Frederic Weisbecker <fweisbec@gmail.com> CC: "David S. Miller" <davem@davemloft.net> CC: Masami Hiramatsu <mhiramat@redhat.com> CC: 'Peter Zijlstra' <peterz@infradead.org> CC: "Frank Ch. Eigler" <fche@redhat.com> CC: 'Hideo AOKI' <haoki@redhat.com> CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com> CC: 'Steven Rostedt' <rostedt@goodmis.org> CC: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/timer.h6
-rw-r--r--include/trace/timer.h24
2 files changed, 27 insertions, 3 deletions
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 425bcfe56c6..f3b763efe11 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -1,8 +1,8 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM timer
-#if !defined(_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_TIMER_H
+#if !defined(_TRACE_EVENTS_TIMER_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_EVENTS_TIMER_H
#include <linux/tracepoint.h>
#include <linux/hrtimer.h>
@@ -323,7 +323,7 @@ TRACE_EVENT(itimer_expire,
(int) __entry->pid, (unsigned long long)__entry->now)
);
-#endif /* _TRACE_TIMER_H */
+#endif /* _TRACE_EVENTS_TIMER_H */
/* This part must be outside protection */
#include <trace/define_trace.h>
diff --git a/include/trace/timer.h b/include/trace/timer.h
new file mode 100644
index 00000000000..9b2a852ca21
--- /dev/null
+++ b/include/trace/timer.h
@@ -0,0 +1,24 @@
+#ifndef _TRACE_TIMER_H
+#define _TRACE_TIMER_H
+
+#include <linux/tracepoint.h>
+
+DECLARE_TRACE(timer_itimer_expired,
+ TP_PROTO(struct signal_struct *sig),
+ TP_ARGS(sig));
+DECLARE_TRACE(timer_itimer_set,
+ TP_PROTO(int which, struct itimerval *value),
+ TP_ARGS(which, value));
+DECLARE_TRACE(timer_set,
+ TP_PROTO(struct timer_list *timer),
+ TP_ARGS(timer));
+/*
+ * xtime_lock is taken when kernel_timer_update_time tracepoint is reached.
+ */
+DECLARE_TRACE(timer_update_time,
+ TP_PROTO(struct timespec *_xtime, struct timespec *_wall_to_monotonic),
+ TP_ARGS(_xtime, _wall_to_monotonic));
+DECLARE_TRACE(timer_timeout,
+ TP_PROTO(struct task_struct *p),
+ TP_ARGS(p));
+#endif