diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:49 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 06:21:19 -0400 |
| commit | 4d6bd5eaa2e1e06d0957376d6e49e6b76ca88db5 (patch) | |
| tree | db9eca41554886a5ffa114c32cb4cf1f1776f469 /include/trace | |
| parent | f6f66a8fc952bbb49e9a6899fd119c46aa8b15bc (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/trace')
| -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 37d4b10b111d..9c6ce789511c 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -46,6 +46,9 @@ TRACE_MAKE_SYSTEM_STR(); | |||
| 46 | __attribute__((section("_ftrace_enum_map"))) \ | 46 | __attribute__((section("_ftrace_enum_map"))) \ |
| 47 | *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a | 47 | *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a |
| 48 | 48 | ||
| 49 | /* for litmus_clock() */ | ||
| 50 | #include <litmus/litmus.h> | ||
| 51 | |||
| 49 | /* | 52 | /* |
| 50 | * DECLARE_EVENT_CLASS can be used to add a generic function | 53 | * DECLARE_EVENT_CLASS can be used to add a generic function |
| 51 | * handlers for events. That is, if all events have the same | 54 | * handlers for events. That is, if all events have the same |
| @@ -91,7 +94,7 @@ TRACE_MAKE_SYSTEM_STR(); | |||
| 91 | #define __bitmask(item, nr_bits) __dynamic_array(char, item, -1) | 94 | #define __bitmask(item, nr_bits) __dynamic_array(char, item, -1) |
| 92 | 95 | ||
| 93 | #undef TP_STRUCT__entry | 96 | #undef TP_STRUCT__entry |
| 94 | #define TP_STRUCT__entry(args...) args | 97 | #define TP_STRUCT__entry(args...) args __field( unsigned long long, __rt_ts ) |
| 95 | 98 | ||
| 96 | #undef DECLARE_EVENT_CLASS | 99 | #undef DECLARE_EVENT_CLASS |
| 97 | #define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \ | 100 | #define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \ |
| @@ -644,7 +647,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
| 644 | memcpy(__get_bitmask(dst), (src), __bitmask_size_in_bytes(nr_bits)) | 647 | memcpy(__get_bitmask(dst), (src), __bitmask_size_in_bytes(nr_bits)) |
| 645 | 648 | ||
| 646 | #undef TP_fast_assign | 649 | #undef TP_fast_assign |
| 647 | #define TP_fast_assign(args...) args | 650 | #define TP_fast_assign(args...) args; __entry->__rt_ts = litmus_clock(); |
| 648 | 651 | ||
| 649 | #undef __perf_addr | 652 | #undef __perf_addr |
| 650 | #define __perf_addr(a) (a) | 653 | #define __perf_addr(a) (a) |
