diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-09 17:12:28 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-09 17:12:28 -0400 |
commit | 6b2fd4cfe200f002cb407494c0990d244340078e (patch) | |
tree | 0f1410b8a7615b8e97d5b491fb21f8b6d8946fdc | |
parent | 4ed64363706efc1de89d309df9cf33fda095a611 (diff) |
Print out average execution with TASK_EXIT
-rw-r--r-- | include/sched_trace.h | 2 | ||||
-rw-r--r-- | src/util.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/sched_trace.h b/include/sched_trace.h index 618214b..64a5754 100644 --- a/include/sched_trace.h +++ b/include/sched_trace.h | |||
@@ -82,7 +82,7 @@ struct st_sys_release_data { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct st_task_exit_data { | 84 | struct st_task_exit_data { |
85 | u64 when; | 85 | u64 avg_exec_time; |
86 | u64 max_exec_time; | 86 | u64 max_exec_time; |
87 | }; | 87 | }; |
88 | 88 | ||
@@ -52,8 +52,6 @@ u64 event_time(struct st_event_record* rec) | |||
52 | case ST_RESUME: | 52 | case ST_RESUME: |
53 | case ST_SYS_RELEASE: | 53 | case ST_SYS_RELEASE: |
54 | case ST_TASK_EXIT: | 54 | case ST_TASK_EXIT: |
55 | when = rec->data.raw[0]; | ||
56 | break; | ||
57 | default: | 55 | default: |
58 | /* stuff that doesn't have a time stamp should occur "early" */ | 56 | /* stuff that doesn't have a time stamp should occur "early" */ |
59 | when = 0; | 57 | when = 0; |
@@ -102,9 +100,9 @@ static void print_time_data2(struct st_event_record* rec) | |||
102 | printf("%6.2fms", rec->data.raw[1] / 1000000.0); | 100 | printf("%6.2fms", rec->data.raw[1] / 1000000.0); |
103 | } | 101 | } |
104 | 102 | ||
105 | static void print_wcet(struct st_event_record* rec) | 103 | static void print_exit(struct st_event_record* rec) |
106 | { | 104 | { |
107 | printf("%lu ns", rec->data.raw[1]); | 105 | printf("Avg: %lu ns, Max: %lu ns", rec->data.raw[0], rec->data.raw[1]); |
108 | } | 106 | } |
109 | 107 | ||
110 | static print_t print_detail[] = { | 108 | static print_t print_detail[] = { |
@@ -120,7 +118,7 @@ static print_t print_detail[] = { | |||
120 | print_nothing, /* RESUME */ | 118 | print_nothing, /* RESUME */ |
121 | print_nothing, /* ACTION */ | 119 | print_nothing, /* ACTION */ |
122 | print_time_data2, /* SYS_RELEASE */ | 120 | print_time_data2, /* SYS_RELEASE */ |
123 | print_wcet,/* TASK_EXIT */ | 121 | print_exit,/* TASK_EXIT */ |
124 | print_raw, /* invalid */ | 122 | print_raw, /* invalid */ |
125 | }; | 123 | }; |
126 | 124 | ||