diff options
Diffstat (limited to 'include/litmus/sched_trace.h')
-rw-r--r-- | include/litmus/sched_trace.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h index adc223e9c8ab..098df0653172 100644 --- a/include/litmus/sched_trace.h +++ b/include/litmus/sched_trace.h | |||
@@ -80,6 +80,11 @@ struct st_sys_release_data { | |||
80 | u64 release; | 80 | u64 release; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | struct st_task_exit_data { | ||
84 | u64 max_exec_time; | ||
85 | u64 __unused; | ||
86 | }; | ||
87 | |||
83 | #define DATA(x) struct st_ ## x ## _data x; | 88 | #define DATA(x) struct st_ ## x ## _data x; |
84 | 89 | ||
85 | typedef enum { | 90 | typedef enum { |
@@ -94,7 +99,8 @@ typedef enum { | |||
94 | ST_BLOCK, | 99 | ST_BLOCK, |
95 | ST_RESUME, | 100 | ST_RESUME, |
96 | ST_ACTION, | 101 | ST_ACTION, |
97 | ST_SYS_RELEASE | 102 | ST_SYS_RELEASE, |
103 | ST_TASK_EXIT, | ||
98 | } st_event_record_type_t; | 104 | } st_event_record_type_t; |
99 | 105 | ||
100 | struct st_event_record { | 106 | struct st_event_record { |
@@ -113,6 +119,7 @@ struct st_event_record { | |||
113 | DATA(resume); | 119 | DATA(resume); |
114 | DATA(action); | 120 | DATA(action); |
115 | DATA(sys_release); | 121 | DATA(sys_release); |
122 | DATA(task_exit); | ||
116 | } data; | 123 | } data; |
117 | }; | 124 | }; |
118 | 125 | ||
@@ -154,6 +161,8 @@ feather_callback void do_sched_trace_action(unsigned long id, | |||
154 | unsigned long action); | 161 | unsigned long action); |
155 | feather_callback void do_sched_trace_sys_release(unsigned long id, | 162 | feather_callback void do_sched_trace_sys_release(unsigned long id, |
156 | lt_t* start); | 163 | lt_t* start); |
164 | feather_callback void do_sched_trace_task_exit(unsigned long id, | ||
165 | struct task_struct* task); | ||
157 | 166 | ||
158 | #endif | 167 | #endif |
159 | 168 | ||
@@ -179,6 +188,7 @@ feather_callback void do_sched_trace_sys_release(unsigned long id, | |||
179 | #define trace_litmus_task_block(t) | 188 | #define trace_litmus_task_block(t) |
180 | #define trace_litmus_task_resume(t) | 189 | #define trace_litmus_task_resume(t) |
181 | #define trace_litmus_sys_release(start) | 190 | #define trace_litmus_sys_release(start) |
191 | #define trace_litmus_task_exit(t) | ||
182 | 192 | ||
183 | #define trace_litmus_container_param(cid, name) | 193 | #define trace_litmus_container_param(cid, name) |
184 | #define trace_litmus_server_param(sid, cid, wcet, time) | 194 | #define trace_litmus_server_param(sid, cid, wcet, time) |
@@ -275,6 +285,13 @@ feather_callback void do_sched_trace_sys_release(unsigned long id, | |||
275 | trace_litmus_sys_release(when); \ | 285 | trace_litmus_sys_release(when); \ |
276 | } while (0) | 286 | } while (0) |
277 | 287 | ||
288 | #define sched_trace_task_exit(t) \ | ||
289 | do { \ | ||
290 | SCHED_TRACE(SCHED_TRACE_BASE_ID + 11, \ | ||
291 | do_sched_trace_task_exit, t); \ | ||
292 | trace_litmus_task_exit(t); \ | ||
293 | } while (0) | ||
294 | |||
278 | #define QT_START lt_t _qt_start = litmus_clock() | 295 | #define QT_START lt_t _qt_start = litmus_clock() |
279 | #define QT_END \ | 296 | #define QT_END \ |
280 | sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ | 297 | sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ |