diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_aedzl.c | 1 | ||||
-rw-r--r-- | litmus/sched_task_trace.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/litmus/sched_aedzl.c b/litmus/sched_aedzl.c index 4943e1ed7616..99c1ad02bbb4 100644 --- a/litmus/sched_aedzl.c +++ b/litmus/sched_aedzl.c | |||
@@ -514,6 +514,7 @@ static noinline void job_completion(struct task_struct *t, int forced) | |||
514 | BUG_ON(!t); | 514 | BUG_ON(!t); |
515 | 515 | ||
516 | sched_trace_task_completion(t, forced); | 516 | sched_trace_task_completion(t, forced); |
517 | sched_trace_task_completion_adaptive(t); | ||
517 | 518 | ||
518 | TRACE_TASK(t, "job_completion().\n"); | 519 | TRACE_TASK(t, "job_completion().\n"); |
519 | 520 | ||
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c index 39a543e22d41..4ae14ac63c2e 100644 --- a/litmus/sched_task_trace.c +++ b/litmus/sched_task_trace.c | |||
@@ -169,6 +169,26 @@ feather_callback void do_sched_trace_task_completion(unsigned long id, | |||
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | feather_callback void do_sched_trace_task_completion_adaptive(unsigned long id, | ||
173 | unsigned long _task) | ||
174 | { | ||
175 | struct task_struct *t = (struct task_struct*) _task; | ||
176 | struct st_event_record* rec = get_record(ST_COMPLETION_ADAPTIVE, t); | ||
177 | if (rec) { | ||
178 | s32 err; | ||
179 | rec->data.completion_adaptive.estimated_exe = get_exec_cost_est(t); | ||
180 | |||
181 | err = _fp_to_integer(_mul(tsk_rt(t)->zl_accum_err, _frac(get_rt_period(t), 1))); | ||
182 | if((err < 0) && _point(tsk_rt(t)->zl_accum_err) < 0) | ||
183 | { | ||
184 | err *= -1; | ||
185 | } | ||
186 | rec->data.completion_adaptive.accumulated_err = err; | ||
187 | |||
188 | put_record(rec); | ||
189 | } | ||
190 | } | ||
191 | |||
172 | feather_callback void do_sched_trace_task_block(unsigned long id, | 192 | feather_callback void do_sched_trace_task_block(unsigned long id, |
173 | unsigned long _task) | 193 | unsigned long _task) |
174 | { | 194 | { |