diff options
-rw-r--r-- | include/litmus/litmus.h | 4 | ||||
-rw-r--r-- | include/litmus/trace.h | 2 | ||||
-rw-r--r-- | litmus/locking.c | 6 | ||||
-rw-r--r-- | litmus/sched_litmus.c | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index a263bc68a7b5..28fb7b331cf3 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
@@ -281,4 +281,8 @@ static inline quanta_t time2quanta(lt_t time, enum round round) | |||
281 | /* By how much is cpu staggered behind CPU 0? */ | 281 | /* By how much is cpu staggered behind CPU 0? */ |
282 | u64 cpu_stagger_offset(int cpu); | 282 | u64 cpu_stagger_offset(int cpu); |
283 | 283 | ||
284 | #define TS_SYSCALL_IN_START \ | ||
285 | if (has_control_page(current)) \ | ||
286 | __TS_SYSCALL_IN_START(&get_control_page(current)->ts_syscall_start); | ||
287 | |||
284 | #endif | 288 | #endif |
diff --git a/include/litmus/trace.h b/include/litmus/trace.h index 4246260865fa..d6829c416912 100644 --- a/include/litmus/trace.h +++ b/include/litmus/trace.h | |||
@@ -76,7 +76,7 @@ feather_callback void save_timestamp_time(unsigned long event, unsigned long tim | |||
76 | * always the next number after the start time event id. | 76 | * always the next number after the start time event id. |
77 | */ | 77 | */ |
78 | 78 | ||
79 | #define TS_SYSCALL_IN_START(p) TIMESTAMP_TIME(10, p) | 79 | #define __TS_SYSCALL_IN_START(p) TIMESTAMP_TIME(10, p) |
80 | #define TS_SYSCALL_IN_END TIMESTAMP_PID(11) | 80 | #define TS_SYSCALL_IN_END TIMESTAMP_PID(11) |
81 | 81 | ||
82 | #define TS_SYSCALL_OUT_START TIMESTAMP_PID(20) | 82 | #define TS_SYSCALL_OUT_START TIMESTAMP_PID(20) |
diff --git a/litmus/locking.c b/litmus/locking.c index 2db2c2813c0b..84a1d8309699 100644 --- a/litmus/locking.c +++ b/litmus/locking.c | |||
@@ -72,8 +72,7 @@ asmlinkage long sys_litmus_lock(int lock_od) | |||
72 | struct od_table_entry* entry; | 72 | struct od_table_entry* entry; |
73 | struct litmus_lock* l; | 73 | struct litmus_lock* l; |
74 | 74 | ||
75 | if (has_control_page(current)) | 75 | TS_SYSCALL_IN_START; |
76 | TS_SYSCALL_IN_START(&get_control_page(current)->ts_syscall_start); | ||
77 | 76 | ||
78 | TS_SYSCALL_IN_END; | 77 | TS_SYSCALL_IN_END; |
79 | 78 | ||
@@ -101,8 +100,7 @@ asmlinkage long sys_litmus_unlock(int lock_od) | |||
101 | struct od_table_entry* entry; | 100 | struct od_table_entry* entry; |
102 | struct litmus_lock* l; | 101 | struct litmus_lock* l; |
103 | 102 | ||
104 | if (has_control_page(current)) | 103 | TS_SYSCALL_IN_START; |
105 | TS_SYSCALL_IN_START(&get_control_page(current)->ts_syscall_start); | ||
106 | 104 | ||
107 | TS_SYSCALL_IN_END; | 105 | TS_SYSCALL_IN_END; |
108 | 106 | ||
diff --git a/litmus/sched_litmus.c b/litmus/sched_litmus.c index e6952896dc4b..231c86daa1f9 100644 --- a/litmus/sched_litmus.c +++ b/litmus/sched_litmus.c | |||
@@ -194,6 +194,8 @@ static void dequeue_task_litmus(struct rq *rq, struct task_struct *p, | |||
194 | 194 | ||
195 | static void yield_task_litmus(struct rq *rq) | 195 | static void yield_task_litmus(struct rq *rq) |
196 | { | 196 | { |
197 | TS_SYSCALL_IN_START; | ||
198 | |||
197 | BUG_ON(rq->curr != current); | 199 | BUG_ON(rq->curr != current); |
198 | /* sched_yield() is called to trigger delayed preemptions. | 200 | /* sched_yield() is called to trigger delayed preemptions. |
199 | * Thus, mark the current task as needing to be rescheduled. | 201 | * Thus, mark the current task as needing to be rescheduled. |