diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2009-12-18 09:08:44 -0500 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2009-12-18 09:08:44 -0500 |
commit | 2f41251f9febad2e54fa338ea63a62818970af0c (patch) | |
tree | 470e7ae6305bc554b1564579586b898fd8da5159 /litmus/litmus.c | |
parent | 0c70a26073633b3879eac57d38f1260c1bebeafc (diff) |
Test kernel tracing events capabilitiestracing-devel
Can events be applied to LITMUS code instead of sched_task_trace ?
PROS:
- architectural indipendency
- easy porting on newer kernel version
- lock free ring buffer implementation already there
CONS:
- need userspace tools conversion to slightly different format
- is it possible to replicate all the previous functionalities?
- only sched_trace_* functions can be implemented through events,
TRACE() debugging features are still implemented in the old way
(??? cannot we simply use the tracing features of the kernel for
debugging purposes ????)
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r-- | litmus/litmus.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index de751a14d77c..c4c74fe299fc 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | #include <litmus/trace.h> | 20 | #include <litmus/trace.h> |
21 | 21 | ||
22 | #include <trace/events/sched.h> | ||
23 | |||
22 | #include <litmus/rt_domain.h> | 24 | #include <litmus/rt_domain.h> |
23 | 25 | ||
24 | /* Number of RT tasks that exist in the system */ | 26 | /* Number of RT tasks that exist in the system */ |
@@ -342,7 +344,8 @@ long litmus_admit_task(struct task_struct* tsk) | |||
342 | 344 | ||
343 | if (!retval) { | 345 | if (!retval) { |
344 | sched_trace_task_name(tsk); | 346 | sched_trace_task_name(tsk); |
345 | sched_trace_task_param(tsk); | 347 | // sched_trace_task_param(tsk); |
348 | trace_litmus_task_param(tsk); | ||
346 | atomic_inc(&rt_task_count); | 349 | atomic_inc(&rt_task_count); |
347 | } | 350 | } |
348 | 351 | ||
@@ -355,7 +358,8 @@ out: | |||
355 | void litmus_exit_task(struct task_struct* tsk) | 358 | void litmus_exit_task(struct task_struct* tsk) |
356 | { | 359 | { |
357 | if (is_realtime(tsk)) { | 360 | if (is_realtime(tsk)) { |
358 | sched_trace_task_completion(tsk, 1); | 361 | // sched_trace_task_completion(tsk, 1); |
362 | trace_litmus_task_completion(tsk, 1); | ||
359 | 363 | ||
360 | litmus->task_exit(tsk); | 364 | litmus->task_exit(tsk); |
361 | 365 | ||