diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-09-16 17:26:56 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-09-16 17:26:56 -0400 |
commit | 1c37b770a1898b1d95468aee69c443cfc04d21e1 (patch) | |
tree | 1face112fe099485108d1a93670e755082890ab1 /include | |
parent | 50e935e4e546f7eee7622d96ca60c78a1fd1c50d (diff) |
Fix: Set litmus 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 19edd7facaa1..53b90b6c8d18 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) \ |
@@ -501,7 +504,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
501 | strcpy(__get_str(dst), src); | 504 | strcpy(__get_str(dst), src); |
502 | 505 | ||
503 | #undef TP_fast_assign | 506 | #undef TP_fast_assign |
504 | #define TP_fast_assign(args...) args | 507 | #define TP_fast_assign(args...) args; __entry->__rt_ts = litmus_clock(); |
505 | 508 | ||
506 | #undef TP_perf_assign | 509 | #undef TP_perf_assign |
507 | #define TP_perf_assign(args...) | 510 | #define TP_perf_assign(args...) |