diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-15 13:39:52 -0400 |
|---|---|---|
| committer | Bryan Ward <bcw@cs.unc.edu> | 2013-04-16 14:37:12 -0400 |
| commit | 8bc303a346cd8dbae6eba585930ffb3104d3c87b (patch) | |
| tree | ac51ce6dbb22040a3b30f6155f27427f56d66568 | |
| parent | 5103b9bce2e9f38e83aaff316fe345eace551c86 (diff) | |
Summarize schedulability with final record
Conflicts:
include/litmus/rt_param.h
litmus/sched_color.c
| -rw-r--r-- | include/litmus/rt_param.h | 3 | ||||
| -rw-r--r-- | include/litmus/sched_trace.h | 19 | ||||
| -rw-r--r-- | litmus/sched_task_trace.c | 15 |
3 files changed, 36 insertions, 1 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 6f52fbc81abd..70c09acbeb28 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
| @@ -271,6 +271,9 @@ struct rt_param { | |||
| 271 | /* Pointer to the page shared between userspace and kernel. */ | 271 | /* Pointer to the page shared between userspace and kernel. */ |
| 272 | struct control_page * ctrl_page; | 272 | struct control_page * ctrl_page; |
| 273 | 273 | ||
| 274 | lt_t total_tardy; | ||
| 275 | lt_t max_tardy; | ||
| 276 | unsigned int missed; | ||
| 274 | lt_t max_exec_time; | 277 | lt_t max_exec_time; |
| 275 | lt_t tot_exec_time; | 278 | lt_t tot_exec_time; |
| 276 | }; | 279 | }; |
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h index f910c63c067a..bf6c4cf4316c 100644 --- a/include/litmus/sched_trace.h +++ b/include/litmus/sched_trace.h | |||
| @@ -85,6 +85,12 @@ struct st_task_exit_data { | |||
| 85 | u64 max_exec_time; | 85 | u64 max_exec_time; |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | struct st_task_tardy_data { | ||
| 89 | u64 total_tardy; | ||
| 90 | u32 max_tardy; | ||
| 91 | u32 missed; | ||
| 92 | }; | ||
| 93 | |||
| 88 | #define DATA(x) struct st_ ## x ## _data x; | 94 | #define DATA(x) struct st_ ## x ## _data x; |
| 89 | 95 | ||
| 90 | typedef enum { | 96 | typedef enum { |
| @@ -101,6 +107,7 @@ typedef enum { | |||
| 101 | ST_ACTION, | 107 | ST_ACTION, |
| 102 | ST_SYS_RELEASE, | 108 | ST_SYS_RELEASE, |
| 103 | ST_TASK_EXIT, | 109 | ST_TASK_EXIT, |
| 110 | ST_TASK_TARDY, | ||
| 104 | } st_event_record_type_t; | 111 | } st_event_record_type_t; |
| 105 | 112 | ||
| 106 | struct st_event_record { | 113 | struct st_event_record { |
| @@ -120,6 +127,7 @@ struct st_event_record { | |||
| 120 | DATA(action); | 127 | DATA(action); |
| 121 | DATA(sys_release); | 128 | DATA(sys_release); |
| 122 | DATA(task_exit); | 129 | DATA(task_exit); |
| 130 | DATA(task_tardy); | ||
| 123 | } data; | 131 | } data; |
| 124 | }; | 132 | }; |
| 125 | 133 | ||
| @@ -163,6 +171,8 @@ feather_callback void do_sched_trace_sys_release(unsigned long id, | |||
| 163 | lt_t* start); | 171 | lt_t* start); |
| 164 | feather_callback void do_sched_trace_task_exit(unsigned long id, | 172 | feather_callback void do_sched_trace_task_exit(unsigned long id, |
| 165 | struct task_struct* task); | 173 | struct task_struct* task); |
| 174 | feather_callback void do_sched_trace_task_tardy(unsigned long id, | ||
| 175 | struct task_struct* task); | ||
| 166 | 176 | ||
| 167 | #endif | 177 | #endif |
| 168 | 178 | ||
| @@ -189,6 +199,7 @@ feather_callback void do_sched_trace_task_exit(unsigned long id, | |||
| 189 | #define trace_litmus_task_resume(t) | 199 | #define trace_litmus_task_resume(t) |
| 190 | #define trace_litmus_sys_release(start) | 200 | #define trace_litmus_sys_release(start) |
| 191 | #define trace_litmus_task_exit(t) | 201 | #define trace_litmus_task_exit(t) |
| 202 | #define trace_litmus_task_tardy(t) | ||
| 192 | 203 | ||
| 193 | #define trace_litmus_container_param(cid, name) | 204 | #define trace_litmus_container_param(cid, name) |
| 194 | #define trace_litmus_server_param(sid, cid, wcet, time) | 205 | #define trace_litmus_server_param(sid, cid, wcet, time) |
| @@ -292,6 +303,14 @@ feather_callback void do_sched_trace_task_exit(unsigned long id, | |||
| 292 | trace_litmus_task_exit(t); \ | 303 | trace_litmus_task_exit(t); \ |
| 293 | } while (0) | 304 | } while (0) |
| 294 | 305 | ||
| 306 | |||
| 307 | #define sched_trace_task_tardy(t) \ | ||
| 308 | do { \ | ||
| 309 | SCHED_TRACE(SCHED_TRACE_BASE_ID + 12, \ | ||
| 310 | do_sched_trace_task_tardy, t); \ | ||
| 311 | trace_litmus_task_tardy(t); \ | ||
| 312 | } while (0) | ||
| 313 | |||
| 295 | #define QT_START lt_t _qt_start = litmus_clock() | 314 | #define QT_START lt_t _qt_start = litmus_clock() |
| 296 | #define QT_END \ | 315 | #define QT_END \ |
| 297 | sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ | 316 | sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ |
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c index 94b36053acd6..7578acd666f3 100644 --- a/litmus/sched_task_trace.c +++ b/litmus/sched_task_trace.c | |||
| @@ -230,7 +230,7 @@ feather_callback void do_sched_trace_sys_release(unsigned long id, | |||
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | feather_callback void do_sched_trace_task_exit(unsigned long id, | 232 | feather_callback void do_sched_trace_task_exit(unsigned long id, |
| 233 | unsigned long _task) | 233 | unsigned long _task) |
| 234 | { | 234 | { |
| 235 | struct task_struct *t = (struct task_struct*) _task; | 235 | struct task_struct *t = (struct task_struct*) _task; |
| 236 | const lt_t max_exec_time = tsk_rt(t)->max_exec_time; | 236 | const lt_t max_exec_time = tsk_rt(t)->max_exec_time; |
| @@ -244,6 +244,19 @@ feather_callback void do_sched_trace_task_exit(unsigned long id, | |||
| 244 | } | 244 | } |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | feather_callback void do_sched_trace_task_tardy(unsigned long id, | ||
| 248 | unsigned long _task) | ||
| 249 | { | ||
| 250 | struct task_struct *t = (struct task_struct*) _task; | ||
| 251 | struct st_event_record *rec = get_record(ST_TASK_TARDY, t); | ||
| 252 | if (rec) { | ||
| 253 | rec->data.task_tardy.max_tardy = tsk_rt(t)->max_tardy; | ||
| 254 | rec->data.task_tardy.total_tardy = tsk_rt(t)->total_tardy; | ||
| 255 | rec->data.task_tardy.missed = tsk_rt(t)->missed; | ||
| 256 | put_record(rec); | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 247 | feather_callback void do_sched_trace_action(unsigned long id, | 260 | feather_callback void do_sched_trace_action(unsigned long id, |
| 248 | unsigned long _task, | 261 | unsigned long _task, |
| 249 | unsigned long action) | 262 | unsigned long action) |
