diff options
Diffstat (limited to 'include/litmus/sched_trace.h')
-rw-r--r-- | include/litmus/sched_trace.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h index 232c7588d103..b1b71f6c5f0c 100644 --- a/include/litmus/sched_trace.h +++ b/include/litmus/sched_trace.h | |||
@@ -10,7 +10,8 @@ struct st_trace_header { | |||
10 | u8 type; /* Of what type is this record? */ | 10 | u8 type; /* Of what type is this record? */ |
11 | u8 cpu; /* On which CPU was it recorded? */ | 11 | u8 cpu; /* On which CPU was it recorded? */ |
12 | u16 pid; /* PID of the task. */ | 12 | u16 pid; /* PID of the task. */ |
13 | u32 job; /* The job sequence number. */ | 13 | u32 job:24; /* The job sequence number. */ |
14 | u8 extra; | ||
14 | } __attribute__((packed)); | 15 | } __attribute__((packed)); |
15 | 16 | ||
16 | #define ST_NAME_LEN 16 | 17 | #define ST_NAME_LEN 16 |
@@ -136,6 +137,22 @@ struct st_nv_interrupt_end_data { | |||
136 | u32 serialNumber; | 137 | u32 serialNumber; |
137 | } __attribute__((packed)); | 138 | } __attribute__((packed)); |
138 | 139 | ||
140 | struct st_prediction_err_data { | ||
141 | u64 distance; | ||
142 | u64 rel_err; | ||
143 | } __attribute__((packed)); | ||
144 | |||
145 | struct st_migration_data { | ||
146 | u64 observed; | ||
147 | u64 estimated; | ||
148 | } __attribute__((packed)); | ||
149 | |||
150 | struct migration_info { | ||
151 | u64 observed; | ||
152 | u64 estimated; | ||
153 | u8 distance; | ||
154 | } __attribute__((packed)); | ||
155 | |||
139 | #define DATA(x) struct st_ ## x ## _data x; | 156 | #define DATA(x) struct st_ ## x ## _data x; |
140 | 157 | ||
141 | typedef enum { | 158 | typedef enum { |
@@ -160,6 +177,9 @@ typedef enum { | |||
160 | ST_EFF_PRIO_CHANGE, | 177 | ST_EFF_PRIO_CHANGE, |
161 | ST_NV_INTERRUPT_BEGIN, | 178 | ST_NV_INTERRUPT_BEGIN, |
162 | ST_NV_INTERRUPT_END, | 179 | ST_NV_INTERRUPT_END, |
180 | |||
181 | ST_PREDICTION_ERR, | ||
182 | ST_MIGRATION, | ||
163 | } st_event_record_type_t; | 183 | } st_event_record_type_t; |
164 | 184 | ||
165 | struct st_event_record { | 185 | struct st_event_record { |
@@ -187,6 +207,9 @@ struct st_event_record { | |||
187 | DATA(effective_priority_change); | 207 | DATA(effective_priority_change); |
188 | DATA(nv_interrupt_begin); | 208 | DATA(nv_interrupt_begin); |
189 | DATA(nv_interrupt_end); | 209 | DATA(nv_interrupt_end); |
210 | |||
211 | DATA(prediction_err); | ||
212 | DATA(migration); | ||
190 | } data; | 213 | } data; |
191 | } __attribute__((packed)); | 214 | } __attribute__((packed)); |
192 | 215 | ||
@@ -259,6 +282,19 @@ feather_callback void do_sched_trace_nv_interrupt_begin(unsigned long id, | |||
259 | feather_callback void do_sched_trace_nv_interrupt_end(unsigned long id, | 282 | feather_callback void do_sched_trace_nv_interrupt_end(unsigned long id, |
260 | unsigned long unused); | 283 | unsigned long unused); |
261 | 284 | ||
285 | feather_callback void do_sched_trace_prediction_err(unsigned long id, | ||
286 | struct task_struct* task, | ||
287 | gpu_migration_dist_t* distance, | ||
288 | fp_t* rel_err); | ||
289 | |||
290 | |||
291 | |||
292 | |||
293 | |||
294 | feather_callback void do_sched_trace_migration(unsigned long id, | ||
295 | struct task_struct* task, | ||
296 | struct migration_info* mig_info); | ||
297 | |||
262 | 298 | ||
263 | /* returns true if we're tracing an interrupt on current CPU */ | 299 | /* returns true if we're tracing an interrupt on current CPU */ |
264 | /* int is_interrupt_tracing_active(void); */ | 300 | /* int is_interrupt_tracing_active(void); */ |
@@ -331,6 +367,12 @@ feather_callback void do_sched_trace_nv_interrupt_end(unsigned long id, | |||
331 | #define sched_trace_nv_interrupt_end(d) \ | 367 | #define sched_trace_nv_interrupt_end(d) \ |
332 | SCHED_TRACE(SCHED_TRACE_BASE_ID + 19, do_sched_trace_nv_interrupt_end, d) | 368 | SCHED_TRACE(SCHED_TRACE_BASE_ID + 19, do_sched_trace_nv_interrupt_end, d) |
333 | 369 | ||
370 | #define sched_trace_prediction_err(t, dist, rel_err) \ | ||
371 | SCHED_TRACE3(SCHED_TRACE_BASE_ID + 20, do_sched_trace_prediction_err, t, dist, rel_err) | ||
372 | |||
373 | #define sched_trace_migration(t, mig_info) \ | ||
374 | SCHED_TRACE2(SCHED_TRACE_BASE_ID + 21, do_sched_trace_migration, t, mig_info) | ||
375 | |||
334 | #define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */ | 376 | #define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */ |
335 | 377 | ||
336 | #endif /* __KERNEL__ */ | 378 | #endif /* __KERNEL__ */ |