diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-10-13 00:16:38 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-10-13 00:16:38 -0400 |
commit | f5001920607dee542ff99a058c13080307de0c73 (patch) | |
tree | e263dcf059da1c4105c2def124f977e034ee8b57 | |
parent | e6c4555d308a5fadb7da9a7394150008adb5dc7d (diff) | |
parent | a565bb17ee38e4a811254c6f0a3e46e8b2c2b66f (diff) |
Merge branch 'wip-mc' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/litmus2010 into wip-mc
-rw-r--r-- | include/litmus/rt_domain.h | 4 | ||||
-rw-r--r-- | include/litmus/trace.h | 7 | ||||
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | litmus/trace.c | 15 |
4 files changed, 23 insertions, 5 deletions
diff --git a/include/litmus/rt_domain.h b/include/litmus/rt_domain.h index 59350fb78d4f..f98d47ccbb0b 100644 --- a/include/litmus/rt_domain.h +++ b/include/litmus/rt_domain.h | |||
@@ -31,10 +31,10 @@ typedef struct _rt_domain { | |||
31 | raw_spinlock_t release_lock; | 31 | raw_spinlock_t release_lock; |
32 | struct release_queue release_queue; | 32 | struct release_queue release_queue; |
33 | 33 | ||
34 | #ifdef CONFIG_MERGE_TIMERS | 34 | #if defined(CONFIG_MERGE_TIMERS) |
35 | struct event_group* event_group; | 35 | struct event_group* event_group; |
36 | int prio; | 36 | int prio; |
37 | #elif CONFIG_RELEASE_MASTER | 37 | #elif defined(CONFIG_RELEASE_MASTER) |
38 | int release_master; | 38 | int release_master; |
39 | #endif | 39 | #endif |
40 | 40 | ||
diff --git a/include/litmus/trace.h b/include/litmus/trace.h index 4fe4aadea8eb..e0c84716d87a 100644 --- a/include/litmus/trace.h +++ b/include/litmus/trace.h | |||
@@ -12,7 +12,8 @@ | |||
12 | enum task_type_marker { | 12 | enum task_type_marker { |
13 | TSK_BE, | 13 | TSK_BE, |
14 | TSK_RT, | 14 | TSK_RT, |
15 | TSK_UNKNOWN | 15 | TSK_UNKNOWN, |
16 | TSK_LVLA | ||
16 | }; | 17 | }; |
17 | 18 | ||
18 | struct timestamp { | 19 | struct timestamp { |
@@ -111,6 +112,10 @@ feather_callback void save_timestamp_time(unsigned long event, unsigned long tim | |||
111 | #define TS_LVLA_RELEASE_START DTIMESTAMP(112, TSK_RT) | 112 | #define TS_LVLA_RELEASE_START DTIMESTAMP(112, TSK_RT) |
112 | #define TS_LVLA_RELEASE_END DTIMESTAMP(113, TSK_RT) | 113 | #define TS_LVLA_RELEASE_END DTIMESTAMP(113, TSK_RT) |
113 | 114 | ||
115 | #define TS_LVLA_SCHED_START DTIMESTAMP(114, TSK_UNKNOWN) | ||
116 | #define TS_LVLA_SCHED_END_ID 115 | ||
117 | #define TS_LVLA_SCHED_END(t) TTIMESTAMP(TS_LVLA_SCHED_END_ID, t) | ||
118 | |||
114 | 119 | ||
115 | #define TS_PLUGIN_SCHED_START /* TIMESTAMP(120) */ /* currently unused */ | 120 | #define TS_PLUGIN_SCHED_START /* TIMESTAMP(120) */ /* currently unused */ |
116 | #define TS_PLUGIN_SCHED_END /* TIMESTAMP(121) */ | 121 | #define TS_PLUGIN_SCHED_END /* TIMESTAMP(121) */ |
diff --git a/kernel/sched.c b/kernel/sched.c index c5d775079027..71907dcd8112 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3810,6 +3810,7 @@ need_resched: | |||
3810 | release_kernel_lock(prev); | 3810 | release_kernel_lock(prev); |
3811 | need_resched_nonpreemptible: | 3811 | need_resched_nonpreemptible: |
3812 | TS_SCHED_START; | 3812 | TS_SCHED_START; |
3813 | TS_LVLA_SCHED_START; | ||
3813 | sched_trace_task_switch_away(prev); | 3814 | sched_trace_task_switch_away(prev); |
3814 | 3815 | ||
3815 | schedule_debug(prev); | 3816 | schedule_debug(prev); |
@@ -3859,6 +3860,7 @@ need_resched_nonpreemptible: | |||
3859 | rq->curr = next; | 3860 | rq->curr = next; |
3860 | ++*switch_count; | 3861 | ++*switch_count; |
3861 | 3862 | ||
3863 | TS_LVLA_SCHED_END(next); | ||
3862 | TS_SCHED_END(next); | 3864 | TS_SCHED_END(next); |
3863 | TS_CXS_START(next); | 3865 | TS_CXS_START(next); |
3864 | context_switch(rq, prev, next); /* unlocks the rq */ | 3866 | context_switch(rq, prev, next); /* unlocks the rq */ |
diff --git a/litmus/trace.c b/litmus/trace.c index 49f8246cda50..1d4593aec71d 100644 --- a/litmus/trace.c +++ b/litmus/trace.c | |||
@@ -5,6 +5,10 @@ | |||
5 | #include <litmus/litmus.h> | 5 | #include <litmus/litmus.h> |
6 | #include <litmus/trace.h> | 6 | #include <litmus/trace.h> |
7 | 7 | ||
8 | #include <litmus/domain.h> | ||
9 | #include <litmus/event_group.h> | ||
10 | #include <litmus/sched_mc.h> | ||
11 | |||
8 | /******************************************************************************/ | 12 | /******************************************************************************/ |
9 | /* Allocation */ | 13 | /* Allocation */ |
10 | /******************************************************************************/ | 14 | /******************************************************************************/ |
@@ -81,8 +85,15 @@ feather_callback void save_timestamp_def(unsigned long event, | |||
81 | feather_callback void save_timestamp_task(unsigned long event, | 85 | feather_callback void save_timestamp_task(unsigned long event, |
82 | unsigned long t_ptr) | 86 | unsigned long t_ptr) |
83 | { | 87 | { |
84 | int rt = is_realtime((struct task_struct *) t_ptr); | 88 | struct task_struct *ts = (struct task_struct*) t_ptr; |
85 | __save_timestamp(event, rt ? TSK_RT : TSK_BE); | 89 | int rt = is_realtime(ts); |
90 | uint8_t type = rt ? TSK_RT : TSK_BE; | ||
91 | |||
92 | if (TS_LVLA_SCHED_END_ID == event) { | ||
93 | if (rt && CRIT_LEVEL_A == tsk_mc_crit(ts)) | ||
94 | type = TSK_LVLA; | ||
95 | } | ||
96 | __save_timestamp(event, type); | ||
86 | } | 97 | } |
87 | 98 | ||
88 | feather_callback void save_timestamp_cpu(unsigned long event, | 99 | feather_callback void save_timestamp_cpu(unsigned long event, |