diff options
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r-- | kernel/sched_debug.c | 54 |
1 files changed, 5 insertions, 49 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 3350169a7d2a..e3b62324ac31 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -36,21 +36,16 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) | |||
36 | else | 36 | else |
37 | SEQ_printf(m, " "); | 37 | SEQ_printf(m, " "); |
38 | 38 | ||
39 | SEQ_printf(m, "%15s %5d %15Ld %13Ld %13Ld %9Ld %5d ", | 39 | SEQ_printf(m, "%15s %5d %15Ld %13Ld %5d ", |
40 | p->comm, p->pid, | 40 | p->comm, p->pid, |
41 | (long long)p->se.fair_key, | 41 | (long long)p->se.fair_key, |
42 | (long long)(p->se.fair_key - rq->cfs.fair_clock), | ||
43 | (long long)p->se.wait_runtime, | ||
44 | (long long)(p->nvcsw + p->nivcsw), | 42 | (long long)(p->nvcsw + p->nivcsw), |
45 | p->prio); | 43 | p->prio); |
46 | #ifdef CONFIG_SCHEDSTATS | 44 | #ifdef CONFIG_SCHEDSTATS |
47 | SEQ_printf(m, "%15Ld %15Ld %15Ld %15Ld %15Ld %15Ld\n", | 45 | SEQ_printf(m, "%15Ld %15Ld %15Ld\n", |
48 | (long long)p->se.vruntime, | 46 | (long long)p->se.vruntime, |
49 | (long long)p->se.sum_exec_runtime, | 47 | (long long)p->se.sum_exec_runtime, |
50 | (long long)p->se.sum_wait_runtime, | 48 | (long long)p->se.sum_sleep_runtime); |
51 | (long long)p->se.sum_sleep_runtime, | ||
52 | (long long)p->se.wait_runtime_overruns, | ||
53 | (long long)p->se.wait_runtime_underruns); | ||
54 | #else | 49 | #else |
55 | SEQ_printf(m, "%15Ld %15Ld %15Ld %15Ld %15Ld\n", | 50 | SEQ_printf(m, "%15Ld %15Ld %15Ld %15Ld %15Ld\n", |
56 | 0LL, 0LL, 0LL, 0LL, 0LL); | 51 | 0LL, 0LL, 0LL, 0LL, 0LL); |
@@ -63,10 +58,8 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) | |||
63 | 58 | ||
64 | SEQ_printf(m, | 59 | SEQ_printf(m, |
65 | "\nrunnable tasks:\n" | 60 | "\nrunnable tasks:\n" |
66 | " task PID tree-key delta waiting" | 61 | " task PID tree-key switches prio" |
67 | " switches prio" | 62 | " exec-runtime sum-exec sum-sleep\n" |
68 | " exec-runtime sum-exec sum-wait sum-sleep" | ||
69 | " wait-overrun wait-underrun\n" | ||
70 | "------------------------------------------------------------------" | 63 | "------------------------------------------------------------------" |
71 | "--------------------------------" | 64 | "--------------------------------" |
72 | "------------------------------------------------" | 65 | "------------------------------------------------" |
@@ -84,29 +77,6 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) | |||
84 | read_unlock_irq(&tasklist_lock); | 77 | read_unlock_irq(&tasklist_lock); |
85 | } | 78 | } |
86 | 79 | ||
87 | static void | ||
88 | print_cfs_rq_runtime_sum(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | ||
89 | { | ||
90 | s64 wait_runtime_rq_sum = 0; | ||
91 | struct task_struct *p; | ||
92 | struct rb_node *curr; | ||
93 | unsigned long flags; | ||
94 | struct rq *rq = &per_cpu(runqueues, cpu); | ||
95 | |||
96 | spin_lock_irqsave(&rq->lock, flags); | ||
97 | curr = first_fair(cfs_rq); | ||
98 | while (curr) { | ||
99 | p = rb_entry(curr, struct task_struct, se.run_node); | ||
100 | wait_runtime_rq_sum += p->se.wait_runtime; | ||
101 | |||
102 | curr = rb_next(curr); | ||
103 | } | ||
104 | spin_unlock_irqrestore(&rq->lock, flags); | ||
105 | |||
106 | SEQ_printf(m, " .%-30s: %Ld\n", "wait_runtime_rq_sum", | ||
107 | (long long)wait_runtime_rq_sum); | ||
108 | } | ||
109 | |||
110 | void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | 80 | void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) |
111 | { | 81 | { |
112 | s64 MIN_vruntime = -1, min_vruntime, max_vruntime = -1, | 82 | s64 MIN_vruntime = -1, min_vruntime, max_vruntime = -1, |
@@ -120,7 +90,6 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
120 | #define P(x) \ | 90 | #define P(x) \ |
121 | SEQ_printf(m, " .%-30s: %Ld\n", #x, (long long)(cfs_rq->x)) | 91 | SEQ_printf(m, " .%-30s: %Ld\n", #x, (long long)(cfs_rq->x)) |
122 | 92 | ||
123 | P(fair_clock); | ||
124 | P(exec_clock); | 93 | P(exec_clock); |
125 | 94 | ||
126 | spin_lock_irqsave(&rq->lock, flags); | 95 | spin_lock_irqsave(&rq->lock, flags); |
@@ -144,13 +113,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
144 | spread0 = min_vruntime - rq0_min_vruntime; | 113 | spread0 = min_vruntime - rq0_min_vruntime; |
145 | SEQ_printf(m, " .%-30s: %Ld\n", "spread0", | 114 | SEQ_printf(m, " .%-30s: %Ld\n", "spread0", |
146 | (long long)spread0); | 115 | (long long)spread0); |
147 | |||
148 | P(wait_runtime); | ||
149 | P(wait_runtime_overruns); | ||
150 | P(wait_runtime_underruns); | ||
151 | #undef P | 116 | #undef P |
152 | |||
153 | print_cfs_rq_runtime_sum(m, cpu, cfs_rq); | ||
154 | } | 117 | } |
155 | 118 | ||
156 | static void print_cpu(struct seq_file *m, int cpu) | 119 | static void print_cpu(struct seq_file *m, int cpu) |
@@ -268,8 +231,6 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
268 | #define P(F) \ | 231 | #define P(F) \ |
269 | SEQ_printf(m, "%-25s:%20Ld\n", #F, (long long)p->F) | 232 | SEQ_printf(m, "%-25s:%20Ld\n", #F, (long long)p->F) |
270 | 233 | ||
271 | P(se.wait_runtime); | ||
272 | P(se.wait_start_fair); | ||
273 | P(se.exec_start); | 234 | P(se.exec_start); |
274 | P(se.vruntime); | 235 | P(se.vruntime); |
275 | P(se.sum_exec_runtime); | 236 | P(se.sum_exec_runtime); |
@@ -283,9 +244,6 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
283 | P(se.exec_max); | 244 | P(se.exec_max); |
284 | P(se.slice_max); | 245 | P(se.slice_max); |
285 | P(se.wait_max); | 246 | P(se.wait_max); |
286 | P(se.wait_runtime_overruns); | ||
287 | P(se.wait_runtime_underruns); | ||
288 | P(se.sum_wait_runtime); | ||
289 | #endif | 247 | #endif |
290 | SEQ_printf(m, "%-25s:%20Ld\n", | 248 | SEQ_printf(m, "%-25s:%20Ld\n", |
291 | "nr_switches", (long long)(p->nvcsw + p->nivcsw)); | 249 | "nr_switches", (long long)(p->nvcsw + p->nivcsw)); |
@@ -312,8 +270,6 @@ void proc_sched_set_task(struct task_struct *p) | |||
312 | p->se.exec_max = 0; | 270 | p->se.exec_max = 0; |
313 | p->se.slice_max = 0; | 271 | p->se.slice_max = 0; |
314 | p->se.wait_max = 0; | 272 | p->se.wait_max = 0; |
315 | p->se.wait_runtime_overruns = 0; | ||
316 | p->se.wait_runtime_underruns = 0; | ||
317 | #endif | 273 | #endif |
318 | p->se.sum_exec_runtime = 0; | 274 | p->se.sum_exec_runtime = 0; |
319 | p->se.prev_sum_exec_runtime = 0; | 275 | p->se.prev_sum_exec_runtime = 0; |