diff options
Diffstat (limited to 'litmus/sched_task_trace.c')
-rw-r--r-- | litmus/sched_task_trace.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c index 8c1ca188bce1..67b01c1dd51b 100644 --- a/litmus/sched_task_trace.c +++ b/litmus/sched_task_trace.c | |||
@@ -7,10 +7,10 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/percpu.h> | 9 | #include <linux/percpu.h> |
10 | #include <linux/math64.h> | ||
10 | 11 | ||
11 | #include <litmus/ftdev.h> | 12 | #include <litmus/ftdev.h> |
12 | #include <litmus/litmus.h> | 13 | #include <litmus/litmus.h> |
13 | |||
14 | #include <litmus/sched_trace.h> | 14 | #include <litmus/sched_trace.h> |
15 | #include <litmus/feather_trace.h> | 15 | #include <litmus/feather_trace.h> |
16 | #include <litmus/ftdev.h> | 16 | #include <litmus/ftdev.h> |
@@ -235,13 +235,9 @@ feather_callback void do_sched_trace_task_exit(unsigned long id, | |||
235 | unsigned long _task) | 235 | unsigned long _task) |
236 | { | 236 | { |
237 | struct task_struct *t = (struct task_struct*) _task; | 237 | struct task_struct *t = (struct task_struct*) _task; |
238 | #ifdef CONFIG_PLUGIN_COLOR | ||
239 | const lt_t max_exec_time = tsk_rt(t)->max_exec_time; | 238 | const lt_t max_exec_time = tsk_rt(t)->max_exec_time; |
240 | const lt_t avg_exec_time = tsk_rt(t)->tot_exec_time / (get_rt_job(t) - 1); | 239 | const lt_t avg_exec_time = div64_u64(tsk_rt(t)->tot_exec_time, (get_job_no(t) - 1)); |
241 | #else | 240 | |
242 | const lt_t max_exec_time = 0; | ||
243 | const lt_t avg_exec_time = 0; | ||
244 | #endif | ||
245 | struct st_event_record *rec = get_record(ST_TASK_EXIT, t); | 241 | struct st_event_record *rec = get_record(ST_TASK_EXIT, t); |
246 | if (rec) { | 242 | if (rec) { |
247 | rec->data.task_exit.avg_exec_time = avg_exec_time; | 243 | rec->data.task_exit.avg_exec_time = avg_exec_time; |