diff options
-rw-r--r-- | include/timestamp.h | 16 | ||||
-rw-r--r-- | src/ft2csv.c | 31 | ||||
-rw-r--r-- | src/timestamp.c | 4 |
3 files changed, 44 insertions, 7 deletions
diff --git a/include/timestamp.h b/include/timestamp.h index d1f73d1..64a0f23 100644 --- a/include/timestamp.h +++ b/include/timestamp.h | |||
@@ -7,7 +7,9 @@ enum task_type_marker { | |||
7 | TSK_BE, | 7 | TSK_BE, |
8 | TSK_RT, | 8 | TSK_RT, |
9 | TSK_UNKNOWN, | 9 | TSK_UNKNOWN, |
10 | TSK_LVLA | 10 | TSK_LVLA, |
11 | TSK_LVLB, | ||
12 | TSK_LVLC | ||
11 | }; | 13 | }; |
12 | 14 | ||
13 | struct timestamp { | 15 | struct timestamp { |
@@ -74,6 +76,18 @@ const char* task_type2str(int task_type); | |||
74 | #define TS_LVLA_SCHED_START TIMESTAMP(114) | 76 | #define TS_LVLA_SCHED_START TIMESTAMP(114) |
75 | #define TS_LVLA_SCHED_END TIMESTAMP(115) | 77 | #define TS_LVLA_SCHED_END TIMESTAMP(115) |
76 | 78 | ||
79 | #define TS_LVLB_RELEASE_START TIMESTAMP(116) | ||
80 | #define TS_LVLB_RELEASE_END TIMESTAMP(117) | ||
81 | |||
82 | #define TS_LVLB_SCHED_START TIMESTAMP(118) | ||
83 | #define TS_LVLB_SCHED_END TIMESTAMP(119) | ||
84 | |||
85 | #define TS_LVLC_RELEASE_START TIMESTAMP(120) | ||
86 | #define TS_LVLC_RELEASE_END TIMESTAMP(121) | ||
87 | |||
88 | #define TS_LVLC_SCHED_START TIMESTAMP(122) | ||
89 | #define TS_LVLC_SCHED_END TIMESTAMP(123) | ||
90 | |||
77 | #define TS_PLUGIN_SCHED_START TIMESTAMP(120) | 91 | #define TS_PLUGIN_SCHED_START TIMESTAMP(120) |
78 | #define TS_PLUGIN_SCHED_END TIMESTAMP(121) | 92 | #define TS_PLUGIN_SCHED_END TIMESTAMP(121) |
79 | 93 | ||
diff --git a/src/ft2csv.c b/src/ft2csv.c index 33b65c4..ce44c7e 100644 --- a/src/ft2csv.c +++ b/src/ft2csv.c | |||
@@ -43,7 +43,9 @@ static unsigned int non_rt = 0; | |||
43 | static unsigned int interleaved = 0; | 43 | static unsigned int interleaved = 0; |
44 | static unsigned int avoided = 0; | 44 | static unsigned int avoided = 0; |
45 | static unsigned int lvl_a_sched = 0; | 45 | static unsigned int lvl_a_sched = 0; |
46 | static unsigned int lvl_a_sched_not_a = 0; | 46 | static unsigned int lvl_b_sched = 0; |
47 | static unsigned int lvl_c_sched = 0; | ||
48 | static unsigned int other_sched = 0; | ||
47 | 49 | ||
48 | #define CYCLES_PER_US 2128 | 50 | #define CYCLES_PER_US 2128 |
49 | 51 | ||
@@ -223,17 +225,31 @@ static void find_event_by_eid(struct timestamp *first, struct timestamp* end) | |||
223 | if (TS_LVLA_SCHED_END == second->event && | 225 | if (TS_LVLA_SCHED_END == second->event && |
224 | second->task_type == TSK_LVLA) | 226 | second->task_type == TSK_LVLA) |
225 | { | 227 | { |
226 | /* second could be a level-A task */ | ||
227 | format_pair(first, second, exec_time); | 228 | format_pair(first, second, exec_time); |
228 | complete++; | 229 | complete++; |
229 | lvl_a_sched++; | 230 | lvl_a_sched++; |
231 | } else if (TS_LVLB_SCHED_END == second->event && | ||
232 | second->task_type == TSK_LVLB) | ||
233 | { | ||
234 | format_pair(first, second, exec_time); | ||
235 | complete++; | ||
236 | lvl_b_sched++; | ||
237 | } else if (TS_LVLC_SCHED_END == second->event && | ||
238 | second->task_type == TSK_LVLC) | ||
239 | { | ||
240 | format_pair(first, second, exec_time); | ||
241 | complete++; | ||
242 | lvl_c_sched++; | ||
243 | |||
230 | } else { | 244 | } else { |
231 | non_rt++; | 245 | non_rt++; |
232 | } | 246 | } |
233 | } else if (TS_LVLA_SCHED_END == second->event && | 247 | } else if ((TS_LVLA_SCHED_END == second->event || |
248 | TS_LVLB_SCHED_END == second->event || | ||
249 | TS_LVLC_SCHED_END == second->event) && | ||
234 | TSK_RT == second->task_type) | 250 | TSK_RT == second->task_type) |
235 | { | 251 | { |
236 | lvl_a_sched_not_a++; | 252 | other_sched++; |
237 | } else | 253 | } else |
238 | { | 254 | { |
239 | format_pair(first, second, exec_time); | 255 | format_pair(first, second, exec_time); |
@@ -403,11 +419,14 @@ int main(int argc, char** argv) | |||
403 | "Non RT : %10d\n" | 419 | "Non RT : %10d\n" |
404 | "Interleaved : %10d\n" | 420 | "Interleaved : %10d\n" |
405 | "Lvl-A Sched : %10d\n" | 421 | "Lvl-A Sched : %10d\n" |
406 | "Lvl-A Sched (non-A) : %10d\n", | 422 | "Lvl-B Sched : %10d\n" |
423 | "Lvl-C Sched : %10d\n" | ||
424 | "Other Sched (non-A) : %10d\n", | ||
407 | (int) count, | 425 | (int) count, |
408 | skipped, avoided, complete, | 426 | skipped, avoided, complete, |
409 | incomplete, filtered, non_rt, | 427 | incomplete, filtered, non_rt, |
410 | interleaved, lvl_a_sched, lvl_a_sched_not_a); | 428 | interleaved, lvl_a_sched, lvl_b_sched, lvl_c_sched, |
429 | other_sched); | ||
411 | 430 | ||
412 | return 0; | 431 | return 0; |
413 | } | 432 | } |
diff --git a/src/timestamp.c b/src/timestamp.c index fa8310d..cad3fb5 100644 --- a/src/timestamp.c +++ b/src/timestamp.c | |||
@@ -24,6 +24,10 @@ static struct event_name event_table[] = | |||
24 | EVENT(SEND_RESCHED), | 24 | EVENT(SEND_RESCHED), |
25 | EVENT(LVLA_RELEASE), | 25 | EVENT(LVLA_RELEASE), |
26 | EVENT(LVLA_SCHED), | 26 | EVENT(LVLA_SCHED), |
27 | EVENT(LVLB_RELEASE), | ||
28 | EVENT(LVLB_SCHED), | ||
29 | EVENT(LVLC_RELEASE), | ||
30 | EVENT(LVLC_SCHED), | ||
27 | {"RELEASE_LATENCY", TS_RELEASE_LATENCY}, | 31 | {"RELEASE_LATENCY", TS_RELEASE_LATENCY}, |
28 | 32 | ||
29 | EVENT(SYSCALL_IN), | 33 | EVENT(SYSCALL_IN), |