aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/sched_trace.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-09-10 13:30:24 -0400
committerGlenn Elliott <gelliott@cs.unc.edu>2012-09-10 13:30:24 -0400
commit893c8943ce5c5527f05ab7e9208d5a942d77d8b5 (patch)
treeaa9e84b3503ff97c1d87bc9c2ce6682e51cfc971 /include/litmus/sched_trace.h
parent901fdd9c22790039a76c1d3ee01828a2f124f6f3 (diff)
parentd3c32e91e3fce2a57083a734efae6d9de06ec02f (diff)
Merge branch 'prop/robust-tie-break' into wip-gpu-rtas12
Conflicts: include/litmus/binheap.h include/litmus/fdso.h include/litmus/litmus.h litmus/Makefile litmus/binheap.c litmus/edf_common.c litmus/fdso.c litmus/jobs.c litmus/locking.c
Diffstat (limited to 'include/litmus/sched_trace.h')
-rw-r--r--include/litmus/sched_trace.h105
1 files changed, 82 insertions, 23 deletions
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h
index b1b71f6c5f0c..7af12f49c600 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace.h
@@ -309,34 +309,93 @@ feather_callback void do_sched_trace_migration(unsigned long id,
309 309
310#endif 310#endif
311 311
312#ifdef CONFIG_SCHED_LITMUS_TRACEPOINT
313
314#include <trace/events/litmus.h>
315
316#else
317
318/* Override trace macros to actually do nothing */
319#define trace_litmus_task_param(t)
320#define trace_litmus_task_release(t)
321#define trace_litmus_switch_to(t)
322#define trace_litmus_switch_away(prev)
323#define trace_litmus_task_completion(t, forced)
324#define trace_litmus_task_block(t)
325#define trace_litmus_task_resume(t)
326#define trace_litmus_sys_release(start)
327
328#endif
329
312 330
313#define SCHED_TRACE_BASE_ID 500 331#define SCHED_TRACE_BASE_ID 500
314 332
315 333
316#define sched_trace_task_name(t) \ 334#define sched_trace_task_name(t) \
317 SCHED_TRACE(SCHED_TRACE_BASE_ID + 1, do_sched_trace_task_name, t) 335 SCHED_TRACE(SCHED_TRACE_BASE_ID + 1, \
318#define sched_trace_task_param(t) \ 336 do_sched_trace_task_name, t)
319 SCHED_TRACE(SCHED_TRACE_BASE_ID + 2, do_sched_trace_task_param, t) 337
320#define sched_trace_task_release(t) \ 338#define sched_trace_task_param(t) \
321 SCHED_TRACE(SCHED_TRACE_BASE_ID + 3, do_sched_trace_task_release, t) 339 do { \
322#define sched_trace_task_switch_to(t) \ 340 SCHED_TRACE(SCHED_TRACE_BASE_ID + 2, \
323 SCHED_TRACE(SCHED_TRACE_BASE_ID + 4, do_sched_trace_task_switch_to, t) 341 do_sched_trace_task_param, t); \
324#define sched_trace_task_switch_away(t) \ 342 trace_litmus_task_param(t); \
325 SCHED_TRACE(SCHED_TRACE_BASE_ID + 5, do_sched_trace_task_switch_away, t) 343 } while (0)
326#define sched_trace_task_completion(t, forced) \ 344
327 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 6, do_sched_trace_task_completion, t, \ 345#define sched_trace_task_release(t) \
328 (unsigned long) forced) 346 do { \
329#define sched_trace_task_block(t) \ 347 SCHED_TRACE(SCHED_TRACE_BASE_ID + 3, \
330 SCHED_TRACE(SCHED_TRACE_BASE_ID + 7, do_sched_trace_task_block, t) 348 do_sched_trace_task_release, t); \
331#define sched_trace_task_resume(t) \ 349 trace_litmus_task_release(t); \
332 SCHED_TRACE(SCHED_TRACE_BASE_ID + 8, do_sched_trace_task_resume, t) 350 } while (0)
333#define sched_trace_action(t, action) \ 351
334 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 9, do_sched_trace_action, t, \ 352#define sched_trace_task_switch_to(t) \
335 (unsigned long) action); 353 do { \
336/* when is a pointer, it does not need an explicit cast to unsigned long */ 354 SCHED_TRACE(SCHED_TRACE_BASE_ID + 4, \
337#define sched_trace_sys_release(when) \ 355 do_sched_trace_task_switch_to, t); \
338 SCHED_TRACE(SCHED_TRACE_BASE_ID + 10, do_sched_trace_sys_release, when) 356 trace_litmus_switch_to(t); \
357 } while (0)
358
359#define sched_trace_task_switch_away(t) \
360 do { \
361 SCHED_TRACE(SCHED_TRACE_BASE_ID + 5, \
362 do_sched_trace_task_switch_away, t); \
363 trace_litmus_switch_away(t); \
364 } while (0)
365
366#define sched_trace_task_completion(t, forced) \
367 do { \
368 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 6, \
369 do_sched_trace_task_completion, t, \
370 (unsigned long) forced); \
371 trace_litmus_task_completion(t, forced); \
372 } while (0)
373
374#define sched_trace_task_block(t) \
375 do { \
376 SCHED_TRACE(SCHED_TRACE_BASE_ID + 7, \
377 do_sched_trace_task_block, t); \
378 trace_litmus_task_block(t); \
379 } while (0)
380
381#define sched_trace_task_resume(t) \
382 do { \
383 SCHED_TRACE(SCHED_TRACE_BASE_ID + 8, \
384 do_sched_trace_task_resume, t); \
385 trace_litmus_task_resume(t); \
386 } while (0)
387
388#define sched_trace_action(t, action) \
389 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 9, \
390 do_sched_trace_action, t, (unsigned long) action);
339 391
392/* when is a pointer, it does not need an explicit cast to unsigned long */
393#define sched_trace_sys_release(when) \
394 do { \
395 SCHED_TRACE(SCHED_TRACE_BASE_ID + 10, \
396 do_sched_trace_sys_release, when); \
397 trace_litmus_sys_release(when); \
398 } while (0)
340 399
341#define sched_trace_tasklet_release(t) \ 400#define sched_trace_tasklet_release(t) \
342 SCHED_TRACE(SCHED_TRACE_BASE_ID + 11, do_sched_trace_tasklet_release, t) 401 SCHED_TRACE(SCHED_TRACE_BASE_ID + 11, do_sched_trace_tasklet_release, t)