aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:48 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 06:21:18 -0400
commitec72e576dfcb1cb0ce0141801f3ee829f6e35137 (patch)
tree74cec0bfcea8dafbd2c4e4fe318045f27ca3e14e /include/litmus
parent1921674066c4ccb534e357c69629e365be626e0e (diff)
Add tracepoint support
This patch integrates LITMUS^RT's sched_trace_XXX() macros with Linux's notion of tracepoints. This is useful to visualize schedules in kernel shark and similar tools. Historically, LITMUS^RT's sched_trace predates Linux's tracepoint infrastructure.
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/sched_trace.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h
index 6044d9f0a05a..82bde8241298 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace.h
@@ -194,24 +194,28 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
194 do { \ 194 do { \
195 SCHED_TRACE(SCHED_TRACE_BASE_ID + 2, \ 195 SCHED_TRACE(SCHED_TRACE_BASE_ID + 2, \
196 do_sched_trace_task_param, t); \ 196 do_sched_trace_task_param, t); \
197 trace_litmus_task_param(t); \
197 } while (0) 198 } while (0)
198 199
199#define sched_trace_task_release(t) \ 200#define sched_trace_task_release(t) \
200 do { \ 201 do { \
201 SCHED_TRACE(SCHED_TRACE_BASE_ID + 3, \ 202 SCHED_TRACE(SCHED_TRACE_BASE_ID + 3, \
202 do_sched_trace_task_release, t); \ 203 do_sched_trace_task_release, t); \
204 trace_litmus_task_release(t); \
203 } while (0) 205 } while (0)
204 206
205#define sched_trace_task_switch_to(t) \ 207#define sched_trace_task_switch_to(t) \
206 do { \ 208 do { \
207 SCHED_TRACE(SCHED_TRACE_BASE_ID + 4, \ 209 SCHED_TRACE(SCHED_TRACE_BASE_ID + 4, \
208 do_sched_trace_task_switch_to, t); \ 210 do_sched_trace_task_switch_to, t); \
211 trace_litmus_switch_to(t); \
209 } while (0) 212 } while (0)
210 213
211#define sched_trace_task_switch_away(t) \ 214#define sched_trace_task_switch_away(t) \
212 do { \ 215 do { \
213 SCHED_TRACE(SCHED_TRACE_BASE_ID + 5, \ 216 SCHED_TRACE(SCHED_TRACE_BASE_ID + 5, \
214 do_sched_trace_task_switch_away, t); \ 217 do_sched_trace_task_switch_away, t); \
218 trace_litmus_switch_away(t); \
215 } while (0) 219 } while (0)
216 220
217#define sched_trace_task_completion(t, forced) \ 221#define sched_trace_task_completion(t, forced) \
@@ -219,18 +223,21 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
219 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 6, \ 223 SCHED_TRACE2(SCHED_TRACE_BASE_ID + 6, \
220 do_sched_trace_task_completion, t, \ 224 do_sched_trace_task_completion, t, \
221 (unsigned long) forced); \ 225 (unsigned long) forced); \
226 trace_litmus_task_completion(t, forced); \
222 } while (0) 227 } while (0)
223 228
224#define sched_trace_task_block(t) \ 229#define sched_trace_task_block(t) \
225 do { \ 230 do { \
226 SCHED_TRACE(SCHED_TRACE_BASE_ID + 7, \ 231 SCHED_TRACE(SCHED_TRACE_BASE_ID + 7, \
227 do_sched_trace_task_block, t); \ 232 do_sched_trace_task_block, t); \
233 trace_litmus_task_block(t); \
228 } while (0) 234 } while (0)
229 235
230#define sched_trace_task_resume(t) \ 236#define sched_trace_task_resume(t) \
231 do { \ 237 do { \
232 SCHED_TRACE(SCHED_TRACE_BASE_ID + 8, \ 238 SCHED_TRACE(SCHED_TRACE_BASE_ID + 8, \
233 do_sched_trace_task_resume, t); \ 239 do_sched_trace_task_resume, t); \
240 trace_litmus_task_resume(t); \
234 } while (0) 241 } while (0)
235 242
236#define sched_trace_action(t, action) \ 243#define sched_trace_action(t, action) \
@@ -242,6 +249,7 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
242 do { \ 249 do { \
243 SCHED_TRACE(SCHED_TRACE_BASE_ID + 10, \ 250 SCHED_TRACE(SCHED_TRACE_BASE_ID + 10, \
244 do_sched_trace_sys_release, when); \ 251 do_sched_trace_sys_release, when); \
252 trace_litmus_sys_release(when); \
245 } while (0) 253 } while (0)
246 254
247#define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */ 255#define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */