From b1f5890e0aa8f0eb4ad9772ca50c1320a8af0a9c Mon Sep 17 00:00:00 2001 From: Christopher Kenna Date: Thu, 4 Oct 2012 15:44:14 -0400 Subject: Add ifdef's for CONFIG_PLUGIN_MC and CONFIG_MERGE_TIMERS. --- litmus/jobs.c | 10 ++++++++++ litmus/litmus.c | 5 ++++- litmus/preempt.c | 2 -- litmus/rt_domain.c | 9 ++++++++- litmus/sched_task_trace.c | 7 +++++++ litmus/trace.c | 8 ++++++++ 6 files changed, 37 insertions(+), 4 deletions(-) (limited to 'litmus') diff --git a/litmus/jobs.c b/litmus/jobs.c index 18388e1ca98d..6ba40db9639f 100644 --- a/litmus/jobs.c +++ b/litmus/jobs.c @@ -9,8 +9,16 @@ #include #include #include + +#ifdef CONFIG_MERGE_TIMERS #include +#endif + +#ifdef CONFIG_PLUGIN_MC #include +#else +#define TRACE_MC_TASK(t, fmt, args...) TRACE_TASK(t, fmt, ##args) +#endif static inline void setup_release(struct task_struct *t, struct rt_job *job, lt_t release) @@ -49,8 +57,10 @@ void setup_user_release(struct task_struct *t, lt_t release) { setup_release(t, &tsk_rt(t)->user_job, release); TRACE_MC_TASK(t, "user rel=%llu, dead=%llu\n", get_user_release(t), get_user_deadline(t)); +#ifdef CONFIG_PLUGIN_MC if (CRIT_LEVEL_A != tsk_mc_crit(t)) sched_trace_task_release(t); +#endif } diff --git a/litmus/litmus.c b/litmus/litmus.c index cb41548d3e2d..07d9d70346a0 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c @@ -13,11 +13,14 @@ #include #include #include -#include #include #include #include +#ifdef CONFIG_MERGE_TIMERS +#include +#endif + #ifdef CONFIG_PLUGIN_MC #include #include diff --git a/litmus/preempt.c b/litmus/preempt.c index 3606cd7ffae7..8f1304afea26 100644 --- a/litmus/preempt.c +++ b/litmus/preempt.c @@ -6,8 +6,6 @@ /* The rescheduling state of each processor. */ DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t, resched_state); -#define TRACE_TASK(t, fmt, args...) -#define TRACE(fmt, args...) void sched_state_will_schedule(struct task_struct* tsk) { diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c index 98a30b88baab..b70c94695a58 100644 --- a/litmus/rt_domain.c +++ b/litmus/rt_domain.c @@ -12,13 +12,16 @@ #include #include -#include #include #include #include #include #include +#ifdef CONFIG_MERGE_TIMERS +#include +#endif + /* Uncomment when debugging timer races... */ #if 1 #define VTRACE_TASK TRACE_TASK @@ -53,11 +56,13 @@ static void do_release(struct release_heap *rh) { unsigned long flags; +#ifdef CONFIG_PLUGIN_MC if (CRIT_LEVEL_B == rh->dom->level) { TS_LVLB_RELEASE_START; } else { TS_LVLC_RELEASE_START; } +#endif TS_RELEASE_LATENCY(rh->release_time); @@ -75,11 +80,13 @@ static void do_release(struct release_heap *rh) /* call release callback */ rh->dom->release_jobs(rh->dom, &rh->heap); +#ifdef CONFIG_PLUGIN_MC if (CRIT_LEVEL_B == rh->dom->level) { TS_LVLB_RELEASE_END; } else { TS_LVLC_RELEASE_END; } +#endif } #ifdef CONFIG_MERGE_TIMERS diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c index a5e7f799c1a9..d6487d3b7837 100644 --- a/litmus/sched_task_trace.c +++ b/litmus/sched_task_trace.c @@ -16,9 +16,14 @@ #include #include #include + +#ifdef CONFIG_MERGE_TIMERS #include +#endif +#ifdef CONFIG_PLUGIN_MC #include +#endif #define NO_EVENTS (1 << CONFIG_SCHED_TASK_TRACE_SHIFT) @@ -136,7 +141,9 @@ feather_callback void do_sched_trace_task_param(unsigned long id, unsigned long rec->data.param.phase = get_rt_phase(t); rec->data.param.partition = get_partition(t); rec->data.param.class = get_class(t); +#ifdef CONFIG_PLUGIN_MC rec->data.param.level = (tsk_mc_data(t) ? tsk_mc_crit(t) : -1); +#endif put_record(rec); } } diff --git a/litmus/trace.c b/litmus/trace.c index 4722ffa443c6..e3883ca61590 100644 --- a/litmus/trace.c +++ b/litmus/trace.c @@ -7,8 +7,14 @@ #include #include + +#ifdef CONFIG_MERGE_TIMERS #include +#endif + +#ifdef CONFIG_PLUGIN_MC #include +#endif /******************************************************************************/ /* Allocation */ @@ -135,6 +141,7 @@ feather_callback void save_timestamp_task(unsigned long event, int rt = is_realtime(ts); uint8_t type = rt ? TSK_RT : TSK_BE; +#ifdef CONFIG_PLUGIN_MC if (TS_LVLA_SCHED_END_ID == event) { if (rt && CRIT_LEVEL_A == tsk_mc_crit(ts)) type = TSK_LVLA; @@ -145,6 +152,7 @@ feather_callback void save_timestamp_task(unsigned long event, if (rt && CRIT_LEVEL_C == tsk_mc_crit(ts)) type = TSK_LVLC; } +#endif __save_timestamp(event, type); } -- cgit v1.2.2