diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-15 13:39:52 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-15 13:39:52 -0400 |
commit | 1cb90226816c7af7808be4c0de866c54da17ecc9 (patch) | |
tree | 512ff08edb877b615aa72f6bec06c29d17ef53a3 /include/litmus | |
parent | 5b2b006507f91f9beeb9538698018fb61d36caf0 (diff) |
Summarize schedulability with final recordwip-color
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/rt_param.h | 5 | ||||
-rw-r--r-- | include/litmus/sched_trace.h | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 003eaf32aa7f..ef9f1fb77c5b 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -228,6 +228,11 @@ struct rt_param { | |||
228 | /* Pointer to the page shared between userspace and kernel. */ | 228 | /* Pointer to the page shared between userspace and kernel. */ |
229 | struct control_page * ctrl_page; | 229 | struct control_page * ctrl_page; |
230 | 230 | ||
231 | |||
232 | lt_t total_tardy; | ||
233 | lt_t max_tardy; | ||
234 | unsigned int missed; | ||
235 | |||
231 | #ifdef CONFIG_PLUGIN_COLOR | 236 | #ifdef CONFIG_PLUGIN_COLOR |
232 | lt_t max_exec_time; | 237 | lt_t max_exec_time; |
233 | lt_t tot_exec_time; | 238 | lt_t tot_exec_time; |
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h index d14eeaf0099f..c94b096cf855 100644 --- a/include/litmus/sched_trace.h +++ b/include/litmus/sched_trace.h | |||
@@ -86,6 +86,12 @@ struct st_task_exit_data { | |||
86 | u64 max_exec_time; | 86 | u64 max_exec_time; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | struct st_task_tardy_data { | ||
90 | u64 total_tardy; | ||
91 | u32 max_tardy; | ||
92 | u32 missed; | ||
93 | }; | ||
94 | |||
89 | #define DATA(x) struct st_ ## x ## _data x; | 95 | #define DATA(x) struct st_ ## x ## _data x; |
90 | 96 | ||
91 | typedef enum { | 97 | typedef enum { |
@@ -102,6 +108,7 @@ typedef enum { | |||
102 | ST_ACTION, | 108 | ST_ACTION, |
103 | ST_SYS_RELEASE, | 109 | ST_SYS_RELEASE, |
104 | ST_TASK_EXIT, | 110 | ST_TASK_EXIT, |
111 | ST_TASK_TARDY, | ||
105 | } st_event_record_type_t; | 112 | } st_event_record_type_t; |
106 | 113 | ||
107 | struct st_event_record { | 114 | struct st_event_record { |
@@ -121,6 +128,7 @@ struct st_event_record { | |||
121 | DATA(action); | 128 | DATA(action); |
122 | DATA(sys_release); | 129 | DATA(sys_release); |
123 | DATA(task_exit); | 130 | DATA(task_exit); |
131 | DATA(task_tardy); | ||
124 | } data; | 132 | } data; |
125 | }; | 133 | }; |
126 | 134 | ||
@@ -164,6 +172,8 @@ feather_callback void do_sched_trace_sys_release(unsigned long id, | |||
164 | lt_t* start); | 172 | lt_t* start); |
165 | feather_callback void do_sched_trace_task_exit(unsigned long id, | 173 | feather_callback void do_sched_trace_task_exit(unsigned long id, |
166 | struct task_struct* task); | 174 | struct task_struct* task); |
175 | feather_callback void do_sched_trace_task_tardy(unsigned long id, | ||
176 | struct task_struct* task); | ||
167 | 177 | ||
168 | #endif | 178 | #endif |
169 | 179 | ||
@@ -190,6 +200,7 @@ feather_callback void do_sched_trace_task_exit(unsigned long id, | |||
190 | #define trace_litmus_task_resume(t, i) | 200 | #define trace_litmus_task_resume(t, i) |
191 | #define trace_litmus_sys_release(start) | 201 | #define trace_litmus_sys_release(start) |
192 | #define trace_litmus_task_exit(t) | 202 | #define trace_litmus_task_exit(t) |
203 | #define trace_litmus_task_tardy(t) | ||
193 | 204 | ||
194 | #define trace_litmus_resource_acquire(t, i); | 205 | #define trace_litmus_resource_acquire(t, i); |
195 | #define trace_litmus_resource_release(t, i); | 206 | #define trace_litmus_resource_release(t, i); |
@@ -281,6 +292,14 @@ feather_callback void do_sched_trace_task_exit(unsigned long id, | |||
281 | trace_litmus_task_exit(t); \ | 292 | trace_litmus_task_exit(t); \ |
282 | } while (0) | 293 | } while (0) |
283 | 294 | ||
295 | |||
296 | #define sched_trace_task_tardy(t) \ | ||
297 | do { \ | ||
298 | SCHED_TRACE(SCHED_TRACE_BASE_ID + 12, \ | ||
299 | do_sched_trace_task_tardy, t); \ | ||
300 | trace_litmus_task_tardy(t); \ | ||
301 | } while (0) | ||
302 | |||
284 | #define QT_START lt_t _qt_start = litmus_clock() | 303 | #define QT_START lt_t _qt_start = litmus_clock() |
285 | #define QT_END \ | 304 | #define QT_END \ |
286 | sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ | 305 | sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ |