aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-12-01 04:47:11 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-12-01 04:47:11 -0500
commit8db31be965afd2b910e747c870941189a63d1457 (patch)
tree47a5bacaa4775415bf073a1dc3e77755f060523c /src
parenta7b6bd92688343a9be234761778727fd3d07e4b2 (diff)
add support system release events
Diffstat (limited to 'src')
-rw-r--r--src/sched_trace.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/sched_trace.c b/src/sched_trace.c
index 434b0d7..0c478f3 100644
--- a/src/sched_trace.c
+++ b/src/sched_trace.c
@@ -22,10 +22,11 @@ static const char* event_names[] = {
22 "COMPLETION", 22 "COMPLETION",
23 "BLOCK", 23 "BLOCK",
24 "RESUME", 24 "RESUME",
25 "SYS_RELEASE",
25 "INVALID" 26 "INVALID"
26}; 27};
27 28
28#define ST_INVALID (ST_RESUME + 1) 29#define ST_INVALID (ST_SYS_RELEASE + 1)
29 30
30 31
31const char* event2name(unsigned int id) 32const char* event2name(unsigned int id)
@@ -48,6 +49,7 @@ u64 event_time(struct st_event_record* rec)
48 case ST_COMPLETION: 49 case ST_COMPLETION:
49 case ST_BLOCK: 50 case ST_BLOCK:
50 case ST_RESUME: 51 case ST_RESUME:
52 case ST_SYS_RELEASE:
51 when = rec->data.raw[0]; 53 when = rec->data.raw[0];
52 break; 54 break;
53 default: 55 default:
@@ -89,18 +91,24 @@ static void print_param(struct st_event_record* rec)
89 rec->data.param.partition); 91 rec->data.param.partition);
90} 92}
91 93
94static void print_time_data2(struct st_event_record* rec)
95{
96 printf("%6.2fms", rec->data.raw[1] / 1000000.0);
97}
98
92static print_t print_detail[] = { 99static print_t print_detail[] = {
93 print_nothing, 100 print_nothing, /* invalid */
94 print_name, 101 print_name, /* NAME */
95 print_param, 102 print_param, /* PARAM */
96 print_nothing, 103 print_time_data2, /* RELEASE */
97 print_nothing, 104 print_nothing, /* ASSIGNED */
98 print_nothing, 105 print_nothing, /* SWITCH_TO */
99 print_nothing, 106 print_nothing, /* SWITCH_FROM */
100 print_nothing, 107 print_nothing, /* COMPLETION */
101 print_nothing, 108 print_nothing, /* BLOCK */
102 print_nothing, 109 print_nothing, /* RESUME */
103 print_nothing 110 print_time_data2, /* SYS_RELEASE */
111 print_nothing, /* invalid */
104}; 112};
105 113
106void print_event(struct st_event_record *rec) 114void print_event(struct st_event_record *rec)