aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/timer.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index df3c07fa0cb8..1844c48d640e 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -270,6 +270,72 @@ TRACE_EVENT(hrtimer_cancel,
270 TP_printk("hrtimer %p", __entry->timer) 270 TP_printk("hrtimer %p", __entry->timer)
271); 271);
272 272
273/**
274 * itimer_state - called when itimer is started or canceled
275 * @which: name of the interval timer
276 * @value: the itimers value, itimer is canceled if value->it_value is
277 * zero, otherwise it is started
278 * @expires: the itimers expiry time
279 */
280TRACE_EVENT(itimer_state,
281
282 TP_PROTO(int which, const struct itimerval *const value,
283 cputime_t expires),
284
285 TP_ARGS(which, value, expires),
286
287 TP_STRUCT__entry(
288 __field( int, which )
289 __field( cputime_t, expires )
290 __field( long, value_sec )
291 __field( long, value_usec )
292 __field( long, interval_sec )
293 __field( long, interval_usec )
294 ),
295
296 TP_fast_assign(
297 __entry->which = which;
298 __entry->expires = expires;
299 __entry->value_sec = value->it_value.tv_sec;
300 __entry->value_usec = value->it_value.tv_usec;
301 __entry->interval_sec = value->it_interval.tv_sec;
302 __entry->interval_usec = value->it_interval.tv_usec;
303 ),
304
305 TP_printk("which %d, expires %lu, it_value %lu.%lu, it_interval %lu.%lu",
306 __entry->which, __entry->expires,
307 __entry->value_sec, __entry->value_usec,
308 __entry->interval_sec, __entry->interval_usec)
309);
310
311/**
312 * itimer_expire - called when itimer expires
313 * @which: type of the interval timer
314 * @pid: pid of the process which owns the timer
315 * @now: current time, used to calculate the latency of itimer
316 */
317TRACE_EVENT(itimer_expire,
318
319 TP_PROTO(int which, struct pid *pid, cputime_t now),
320
321 TP_ARGS(which, pid, now),
322
323 TP_STRUCT__entry(
324 __field( int , which )
325 __field( pid_t, pid )
326 __field( cputime_t, now )
327 ),
328
329 TP_fast_assign(
330 __entry->which = which;
331 __entry->now = now;
332 __entry->pid = pid_nr(pid);
333 ),
334
335 TP_printk("which %d, pid %d, now %lu", __entry->which,
336 (int) __entry->pid, __entry->now)
337);
338
273#endif /* _TRACE_TIMER_H */ 339#endif /* _TRACE_TIMER_H */
274 340
275/* This part must be outside protection */ 341/* This part must be outside protection */