aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2013-02-20 09:58:37 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2013-02-20 09:58:37 -0500
commit18aae5bfbead48ce3ae03da8932a69b641e18f98 (patch)
tree0585c32c60c5ffab00ef61a87b4c480b9cdfa8a0 /litmus
parent6da7825f25093758981c1436f6956569662f72b1 (diff)
Fixed migration tracing. Added inject of ST_ACTION
Diffstat (limited to 'litmus')
-rw-r--r--litmus/sched_task_trace.c51
1 files changed, 28 insertions, 23 deletions
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c
index d1df0127cfa4..e863eaf41b96 100644
--- a/litmus/sched_task_trace.c
+++ b/litmus/sched_task_trace.c
@@ -200,8 +200,21 @@ feather_callback void do_sched_trace_task_block(unsigned long id,
200{ 200{
201 struct task_struct *t = (struct task_struct*) _task; 201 struct task_struct *t = (struct task_struct*) _task;
202 struct st_event_record* rec = get_record(ST_BLOCK, t); 202 struct st_event_record* rec = get_record(ST_BLOCK, t);
203
203 if (rec) { 204 if (rec) {
204 rec->data.block.when = now(); 205 rec->data.block.when = now();
206
207 // hiding is turned on by locking protocols, so if there isn't any
208 // hiding, then we're blocking for some other reason. assume it's I/O.
209 rec->data.block.for_io = 0
210#ifdef CONFIG_REALTIME_AUX_TASKS
211 || (tsk_rt(t)->has_aux_tasks && !tsk_rt(t)->hide_from_aux_tasks)
212#endif
213#ifdef CONFIG_LITMUS_NVIDIA
214 || (tsk_rt(t)->held_gpus && !tsk_rt(t)->hide_from_gpu)
215#endif
216 ;
217
205 put_record(rec); 218 put_record(rec);
206 } 219 }
207} 220}
@@ -243,28 +256,6 @@ feather_callback void do_sched_trace_action(unsigned long id,
243 } 256 }
244} 257}
245 258
246
247
248
249feather_callback void do_sched_trace_prediction_err(unsigned long id,
250 unsigned long _task,
251 unsigned long _distance,
252 unsigned long _rel_err)
253{
254 struct task_struct *t = (struct task_struct*) _task;
255 struct st_event_record *rec = get_record(ST_PREDICTION_ERR, t);
256
257 if (rec) {
258 gpu_migration_dist_t* distance = (gpu_migration_dist_t*) _distance;
259 fp_t* rel_err = (fp_t*) _rel_err;
260
261 rec->data.prediction_err.distance = *distance;
262 rec->data.prediction_err.rel_err = rel_err->val;
263 put_record(rec);
264 }
265}
266
267
268feather_callback void do_sched_trace_migration(unsigned long id, 259feather_callback void do_sched_trace_migration(unsigned long id,
269 unsigned long _task, 260 unsigned long _task,
270 unsigned long _mig_info) 261 unsigned long _mig_info)
@@ -285,7 +276,21 @@ feather_callback void do_sched_trace_migration(unsigned long id,
285 276
286 277
287 278
279feather_callback void do_sched_trace_lock(unsigned long id,
280 unsigned long _task,
281 unsigned long _lock_id,
282 unsigned long _acquired)
283{
284 struct task_struct *t = (struct task_struct*) _task;
285 struct st_event_record *rec = get_record(ST_LOCK, t);
288 286
287 if (rec) {
288 rec->data.lock.when = now();
289 rec->data.lock.lock_id = _lock_id;
290 rec->data.lock.acquired = _acquired;
291 put_record(rec);
292 }
293}
289 294
290 295
291 296