aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2012-03-28 21:05:39 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2012-03-28 21:05:39 -0400
commitf14b3c3c9dac4827cfd8d54ecc8e760884356757 (patch)
tree3c0e649775acec55ca2b304d0e8e196bb461445b
parent88b8f6f7015c320706ef8a258404e169708a4acf (diff)
Container tracing working
-rw-r--r--include/trace/events/litmus.h4
-rw-r--r--include/trace/ftrace.h5
-rw-r--r--litmus/sched_mc.c4
-rw-r--r--litmus/sched_mc_ce.c6
4 files changed, 12 insertions, 7 deletions
diff --git a/include/trace/events/litmus.h b/include/trace/events/litmus.h
index 5ca4bef205f0..4ad053eac27d 100644
--- a/include/trace/events/litmus.h
+++ b/include/trace/events/litmus.h
@@ -310,7 +310,9 @@ TRACE_EVENT(litmus_server_switch_away,
310 310
311TRACE_EVENT(litmus_server_release, 311TRACE_EVENT(litmus_server_release,
312 312
313 TP_PROTO(int sid, unsigned int job, unsigned long long release, unsigned long long deadline), 313 TP_PROTO(int sid, unsigned int job,
314 unsigned long long release,
315 unsigned long long deadline),
314 316
315 TP_ARGS(sid, job, release, deadline), 317 TP_ARGS(sid, job, release, deadline),
316 318
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index a9377c0083ad..47679aa5dd09 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -17,6 +17,7 @@
17 */ 17 */
18 18
19#include <linux/ftrace_event.h> 19#include <linux/ftrace_event.h>
20#include <litmus/litmus.h>
20 21
21/* 22/*
22 * DECLARE_EVENT_CLASS can be used to add a generic function 23 * DECLARE_EVENT_CLASS can be used to add a generic function
@@ -54,7 +55,7 @@
54#define __string(item, src) __dynamic_array(char, item, -1) 55#define __string(item, src) __dynamic_array(char, item, -1)
55 56
56#undef TP_STRUCT__entry 57#undef TP_STRUCT__entry
57#define TP_STRUCT__entry(args...) args 58#define TP_STRUCT__entry(args...) args __field( unsigned long long, __rt_ts )
58 59
59#undef DECLARE_EVENT_CLASS 60#undef DECLARE_EVENT_CLASS
60#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \ 61#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
@@ -479,7 +480,7 @@ static inline notrace int ftrace_get_offsets_##call( \
479 strcpy(__get_str(dst), src); 480 strcpy(__get_str(dst), src);
480 481
481#undef TP_fast_assign 482#undef TP_fast_assign
482#define TP_fast_assign(args...) args 483#define TP_fast_assign(args...) args; __entry->__rt_ts = litmus_clock();
483 484
484#undef TP_perf_assign 485#undef TP_perf_assign
485#define TP_perf_assign(args...) 486#define TP_perf_assign(args...)
diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c
index eb8ae7fab95a..41f02ee3e6ca 100644
--- a/litmus/sched_mc.c
+++ b/litmus/sched_mc.c
@@ -126,7 +126,9 @@ static int interrupt_cpu;
126 126
127static int sid(struct crit_entry *ce) 127static int sid(struct crit_entry *ce)
128{ 128{
129 return ce->level * num_online_cpus() + crit_cpu(ce)->cpu; 129 int level = ce->level * num_online_cpus() + crit_cpu(ce)->cpu + 1;
130 BUG_ON(level >= 0);
131 return -level;
130} 132}
131 133
132/* 134/*
diff --git a/litmus/sched_mc_ce.c b/litmus/sched_mc_ce.c
index 4808377b9bb7..702b46da93d5 100644
--- a/litmus/sched_mc_ce.c
+++ b/litmus/sched_mc_ce.c
@@ -139,7 +139,7 @@ static void mc_ce_job_completion(struct domain *dom, struct task_struct *ts)
139 139
140 TRACE_TASK(ts, "Completed\n"); 140 TRACE_TASK(ts, "Completed\n");
141 141
142 sched_trace_task_completion(ts, 0); 142 /* sched_trace_task_completion(ts, 0); */
143 /* post-increment is important here */ 143 /* post-increment is important here */
144 just_finished = (tsk_rt(ts)->job_params.job_no)++; 144 just_finished = (tsk_rt(ts)->job_params.job_no)++;
145 145
@@ -292,7 +292,7 @@ long mc_ce_admit_task_common(struct task_struct *ts)
292 printk(KERN_INFO "litmus: couldn't get pid struct for %d\n", 292 printk(KERN_INFO "litmus: couldn't get pid struct for %d\n",
293 ts->pid); 293 ts->pid);
294 goto out; 294 goto out;
295n } 295 }
296 296
297 if (lvl_a_id >= pid_table->num_pid_entries) { 297 if (lvl_a_id >= pid_table->num_pid_entries) {
298 printk(KERN_INFO "litmus: level A id greater than expected " 298 printk(KERN_INFO "litmus: level A id greater than expected "
@@ -499,7 +499,7 @@ lt_t mc_ce_timer_callback_common(struct domain *dom)
499 tsk_rt(should_schedule)->job_params.deadline - 499 tsk_rt(should_schedule)->job_params.deadline -
500 pid_entry->budget; 500 pid_entry->budget;
501 tsk_rt(should_schedule)->job_params.exec_time = 0; 501 tsk_rt(should_schedule)->job_params.exec_time = 0;
502 sched_trace_task_release(should_schedule); 502 /* sched_trace_task_release(should_schedule); */
503 set_rt_flags(ce_data->should_schedule, RT_F_RUNNING); 503 set_rt_flags(ce_data->should_schedule, RT_F_RUNNING);
504 } 504 }
505 return next_timer_abs; 505 return next_timer_abs;