diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-09-16 17:26:56 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2014-06-07 05:30:46 -0400 |
commit | 95f5c2293077eb70d47ec182cdc9519bf56befd2 (patch) | |
tree | e6e9d6be55591338781f1cdbf2310175e948ba00 /include | |
parent | 4e09d7748a46195fcbb3ba549dbb01146e03b763 (diff) |
Record LITMUS^RT timestamp in ftrace records
Patch updates ftrace.h to record a litmus_clock() time stamp
in ftrace records.
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/ftrace.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index dbb47418df81..1aa562a11d9b 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) \ |
@@ -499,7 +502,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
499 | strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)"); | 502 | strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)"); |
500 | 503 | ||
501 | #undef TP_fast_assign | 504 | #undef TP_fast_assign |
502 | #define TP_fast_assign(args...) args | 505 | #define TP_fast_assign(args...) args; __entry->__rt_ts = litmus_clock(); |
503 | 506 | ||
504 | #undef TP_perf_assign | 507 | #undef TP_perf_assign |
505 | #define TP_perf_assign(args...) | 508 | #define TP_perf_assign(args...) |