aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2007-10-09 04:00:14 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2007-10-09 04:00:14 -0400
commit9083d3e83ef2362c38fca59e74094329f5cfec3b (patch)
tree4988019febc37e8e4eeb8c95be90bbbe27210fad /include/linux
parenta7235603d35a6c2ecc72f91f4c751c3400d98566 (diff)
sched_trace: add sched_trace_weight_error()
Export the accuracy of the error prediction to user space.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched_trace.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/include/linux/sched_trace.h b/include/linux/sched_trace.h
index 76e149b36c..88d19e2903 100644
--- a/include/linux/sched_trace.h
+++ b/include/linux/sched_trace.h
@@ -6,16 +6,17 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7 7
8typedef enum { 8typedef enum {
9 ST_INVOCATION = 0, 9 ST_INVOCATION = 0,
10 ST_ARRIVAL = 1, 10 ST_ARRIVAL = 1,
11 ST_DEPARTURE = 2, 11 ST_DEPARTURE = 2,
12 ST_PREEMPTION = 3, 12 ST_PREEMPTION = 3,
13 ST_SCHEDULED = 4, 13 ST_SCHEDULED = 4,
14 ST_JOB_RELEASE = 5, 14 ST_JOB_RELEASE = 5,
15 ST_JOB_COMPLETION = 6, 15 ST_JOB_COMPLETION = 6,
16 ST_CAPACITY_RELEASE = 7, 16 ST_CAPACITY_RELEASE = 7,
17 ST_CAPACITY_ALLOCATION = 8, 17 ST_CAPACITY_ALLOCATION = 8,
18 ST_SERVICE_LEVEL_CHANGE = 9 18 ST_SERVICE_LEVEL_CHANGE = 9,
19 ST_WEIGHT_ERROR = 10,
19} trace_type_t; 20} trace_type_t;
20 21
21typedef struct { 22typedef struct {
@@ -95,6 +96,13 @@ typedef struct {
95 service_level_t new_level; 96 service_level_t new_level;
96} service_level_change_record_t; 97} service_level_change_record_t;
97 98
99typedef struct {
100 trace_header_t header;
101 pid_t task;
102 fp_t estimate;
103 fp_t actual;
104} weight_error_record_t;
105
98#ifdef CONFIG_SCHED_TASK_TRACE 106#ifdef CONFIG_SCHED_TASK_TRACE
99void sched_trace_scheduler_invocation(void); 107void sched_trace_scheduler_invocation(void);
100 108
@@ -128,6 +136,7 @@ void sched_trace_server_scheduled(int id, task_class_t class,
128 136
129void sched_trace_service_level_change(struct task_struct* t); 137void sched_trace_service_level_change(struct task_struct* t);
130 138
139void sched_trace_weight_error(struct task_struct* t, fp_t actual);
131 140
132#else 141#else
133#define sched_trace_scheduler_invocation(x) 142#define sched_trace_scheduler_invocation(x)
@@ -148,6 +157,9 @@ void sched_trace_service_level_change(struct task_struct* t);
148 157
149#define sched_trace_service_level_change(t) 158#define sched_trace_service_level_change(t)
150 159
160#define sched_trace_weight_error(x, y)
161
162
151#endif 163#endif
152 164
153 165