diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-02-20 18:22:56 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-02-20 18:22:56 -0500 |
commit | 8befda625795b575f55f033e20e09801eaccdd56 (patch) | |
tree | 2edf652acc25469bfc1007eb60d4b8dd8e747bf0 /logformat.h | |
parent | b32b21bd57b21b249447e2944c4473e0d196bb4f (diff) |
added missing logformat.h
This file is needed to build the schedtrace tools. It should be part of
liblitmus since it should contain all importat header files and user space
interfaces.
Diffstat (limited to 'logformat.h')
-rw-r--r-- | logformat.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/logformat.h b/logformat.h new file mode 100644 index 0000000..3a74bf7 --- /dev/null +++ b/logformat.h | |||
@@ -0,0 +1,112 @@ | |||
1 | #ifndef LOGFORMAT_H | ||
2 | #define LOGFORMAT_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #include "litmus.h" | ||
7 | |||
8 | typedef __u8 u8; | ||
9 | typedef __u32 u32; | ||
10 | typedef __u16 u16; | ||
11 | |||
12 | typedef enum { | ||
13 | ST_INVOCATION = 0, | ||
14 | ST_ARRIVAL = 1, | ||
15 | ST_DEPARTURE = 2, | ||
16 | ST_PREEMPTION = 3, | ||
17 | ST_SCHEDULED = 4, | ||
18 | ST_JOB_RELEASE = 5, | ||
19 | ST_JOB_COMPLETION = 6, | ||
20 | ST_CAPACITY_RELEASE = 7, | ||
21 | ST_CAPACITY_ALLOCATION = 8, | ||
22 | ST_LAST_TYPE = 8 | ||
23 | } trace_type_t; | ||
24 | |||
25 | typedef struct { | ||
26 | trace_type_t trace:8; | ||
27 | unsigned long long timestamp; | ||
28 | } trace_header_t; | ||
29 | |||
30 | |||
31 | typedef struct { | ||
32 | unsigned int is_rt:1; | ||
33 | unsigned int is_server:1; | ||
34 | task_class_t cls:4; | ||
35 | unsigned int budget:24; | ||
36 | u32 deadline; | ||
37 | |||
38 | pid_t pid; | ||
39 | } task_info_t; | ||
40 | |||
41 | typedef struct { | ||
42 | trace_header_t header; | ||
43 | unsigned long flags; | ||
44 | } invocation_record_t; | ||
45 | |||
46 | typedef struct { | ||
47 | trace_header_t header; | ||
48 | task_info_t task; | ||
49 | } arrival_record_t; | ||
50 | |||
51 | typedef struct { | ||
52 | trace_header_t header; | ||
53 | task_info_t task; | ||
54 | } departure_record_t; | ||
55 | |||
56 | typedef struct { | ||
57 | trace_header_t header; | ||
58 | task_info_t task; | ||
59 | task_info_t by; | ||
60 | } preemption_record_t; | ||
61 | |||
62 | typedef struct { | ||
63 | trace_header_t header; | ||
64 | task_info_t task; | ||
65 | } scheduled_record_t; | ||
66 | |||
67 | typedef struct { | ||
68 | trace_header_t header; | ||
69 | task_info_t task; | ||
70 | u16 period; | ||
71 | u16 wcet; | ||
72 | } release_record_t; | ||
73 | |||
74 | typedef struct { | ||
75 | trace_header_t header; | ||
76 | task_info_t task; | ||
77 | u16 period; | ||
78 | u16 wcet; | ||
79 | int tardiness; | ||
80 | } completion_record_t; | ||
81 | |||
82 | typedef struct { | ||
83 | trace_header_t header; | ||
84 | task_info_t task; | ||
85 | } cap_release_record_t; | ||
86 | |||
87 | typedef struct { | ||
88 | trace_header_t header; | ||
89 | task_info_t task; | ||
90 | u16 budget; | ||
91 | u32 deadline; | ||
92 | pid_t donor; | ||
93 | } cap_allocation_record_t; | ||
94 | |||
95 | |||
96 | typedef union { | ||
97 | trace_header_t header; | ||
98 | invocation_record_t invocation; | ||
99 | arrival_record_t arrival; | ||
100 | preemption_record_t preemption; | ||
101 | scheduled_record_t scheduled; | ||
102 | |||
103 | release_record_t release; | ||
104 | completion_record_t completion; | ||
105 | |||
106 | cap_release_record_t cap_release; | ||
107 | cap_allocation_record_t cap_alloc; | ||
108 | } trace_record_t; | ||
109 | |||
110 | |||
111 | |||
112 | #endif | ||