aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2013-09-16 17:26:56 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2014-10-21 10:02:52 -0400
commit751073bc996ac77c219c2031282ee7ce0f473af5 (patch)
treec798b46fe315118b365fd52ed3e6af09b346fc74
parenta1b5e6c8f816c6c28dfbce7e16d3977f96e380f2 (diff)
Record LITMUS^RT timestamp in ftrace records
Patch updates ftrace.h to record a litmus_clock() time stamp in ftrace records.
-rw-r--r--include/trace/ftrace.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 66dba42128d7..75710120c6d5 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -18,6 +18,9 @@
18 18
19#include <linux/ftrace_event.h> 19#include <linux/ftrace_event.h>
20 20
21/* for litmus_clock() */
22#include <litmus/litmus.h>
23
21/* 24/*
22 * DECLARE_EVENT_CLASS can be used to add a generic function 25 * DECLARE_EVENT_CLASS can be used to add a generic function
23 * handlers for events. That is, if all events have the same 26 * handlers for events. That is, if all events have the same
@@ -54,7 +57,7 @@
54#define __string(item, src) __dynamic_array(char, item, -1) 57#define __string(item, src) __dynamic_array(char, item, -1)
55 58
56#undef TP_STRUCT__entry 59#undef TP_STRUCT__entry
57#define TP_STRUCT__entry(args...) args 60#define TP_STRUCT__entry(args...) args __field( unsigned long long, __rt_ts )
58 61
59#undef DECLARE_EVENT_CLASS 62#undef DECLARE_EVENT_CLASS
60#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \ 63#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
@@ -502,7 +505,7 @@ static inline notrace int ftrace_get_offsets_##call( \
502 strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)"); 505 strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)");
503 506
504#undef TP_fast_assign 507#undef TP_fast_assign
505#define TP_fast_assign(args...) args 508#define TP_fast_assign(args...) args; __entry->__rt_ts = litmus_clock();
506 509
507#undef TP_perf_assign 510#undef TP_perf_assign
508#define TP_perf_assign(args...) 511#define TP_perf_assign(args...)