aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/sched_trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/sched_trace.h')
-rw-r--r--include/litmus/sched_trace.h66
1 files changed, 62 insertions, 4 deletions
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h
index 82bde8241298..adc223e9c8ab 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace.h
@@ -180,6 +180,13 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
180#define trace_litmus_task_resume(t) 180#define trace_litmus_task_resume(t)
181#define trace_litmus_sys_release(start) 181#define trace_litmus_sys_release(start)
182 182
183#define trace_litmus_container_param(cid, name)
184#define trace_litmus_server_param(sid, cid, wcet, time)
185#define trace_litmus_server_switch_to(sid, job, tid)
186#define trace_litmus_server_switch_away(sid, job, tid)
187#define trace_litmus_server_release(sid, job, release, deadline)
188#define trace_litmus_server_completion(sid, job)
189
183#endif 190#endif
184 191
185 192
@@ -226,18 +233,34 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
226 trace_litmus_task_completion(t, forced); \ 233 trace_litmus_task_completion(t, forced); \
227 } while (0) 234 } while (0)
228 235
229#define sched_trace_task_block(t) \ 236#define sched_trace_task_block_on(t, i) \
230 do { \ 237 do { \
231 SCHED_TRACE(SCHED_TRACE_BASE_ID + 7, \ 238 SCHED_TRACE(SCHED_TRACE_BASE_ID + 7, \
232 do_sched_trace_task_block, t); \ 239 do_sched_trace_task_block, t); \
233 trace_litmus_task_block(t); \ 240 trace_litmus_task_block(t, i); \
234 } while (0) 241 } while (0)
235 242
236#define sched_trace_task_resume(t) \ 243#define sched_trace_task_block(t) \
244 sched_trace_task_block_on(t, 0)
245
246#define sched_trace_task_resume_on(t, i) \
237 do { \ 247 do { \
238 SCHED_TRACE(SCHED_TRACE_BASE_ID + 8, \ 248 SCHED_TRACE(SCHED_TRACE_BASE_ID + 8, \
239 do_sched_trace_task_resume, t); \ 249 do_sched_trace_task_resume, t); \
240 trace_litmus_task_resume(t); \ 250 trace_litmus_task_resume(t, i); \
251 } while (0)
252
253#define sched_trace_task_resume(t) \
254 sched_trace_task_resume_on(t, 0)
255
256#define sched_trace_resource_acquire(t, i) \
257 do { \
258 trace_litmus_resource_acquire(t, i); \
259 } while (0)
260
261#define sched_trace_resource_released(t, i) \
262 do { \
263 trace_litmus_resource_released(t, i); \
241 } while (0) 264 } while (0)
242 265
243#define sched_trace_action(t, action) \ 266#define sched_trace_action(t, action) \
@@ -252,6 +275,41 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
252 trace_litmus_sys_release(when); \ 275 trace_litmus_sys_release(when); \
253 } while (0) 276 } while (0)
254 277
278#define QT_START lt_t _qt_start = litmus_clock()
279#define QT_END \
280 sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \
281 TRACE_ARGS, litmus_clock() - _qt_start)
282
283#define sched_trace_container_param(cid, name) \
284 do { \
285 trace_litmus_container_param(cid, name); \
286 } while (0)
287
288#define sched_trace_server_param(sid, cid, wcet, period) \
289 do { \
290 trace_litmus_server_param(sid, cid, wcet, period); \
291 } while(0)
292
293#define sched_trace_server_switch_to(sid, job, tid) \
294 do { \
295 trace_litmus_server_switch_to(sid, job, tid); \
296 } while(0)
297
298#define sched_trace_server_switch_away(sid, job, tid) \
299 do { \
300 trace_litmus_server_switch_away(sid, job, tid); \
301 } while (0)
302
303#define sched_trace_server_release(sid, job, rel, dead) \
304 do { \
305 trace_litmus_server_release(sid, job, rel, dead); \
306 } while (0)
307
308#define sched_trace_server_completion(sid, job) \
309 do { \
310 trace_litmus_server_completion(sid, job); \
311 } while (0)
312
255#define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */ 313#define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */
256 314
257#endif /* __KERNEL__ */ 315#endif /* __KERNEL__ */