aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r--kernel/sched_debug.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 0eca442b7792..1c61e5315ad2 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -44,11 +44,16 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p, u64 now)
44 (long long)p->se.wait_runtime, 44 (long long)p->se.wait_runtime,
45 (long long)(p->nvcsw + p->nivcsw), 45 (long long)(p->nvcsw + p->nivcsw),
46 p->prio, 46 p->prio,
47#ifdef CONFIG_SCHEDSTATS
47 (long long)p->se.sum_exec_runtime, 48 (long long)p->se.sum_exec_runtime,
48 (long long)p->se.sum_wait_runtime, 49 (long long)p->se.sum_wait_runtime,
49 (long long)p->se.sum_sleep_runtime, 50 (long long)p->se.sum_sleep_runtime,
50 (long long)p->se.wait_runtime_overruns, 51 (long long)p->se.wait_runtime_overruns,
51 (long long)p->se.wait_runtime_underruns); 52 (long long)p->se.wait_runtime_underruns
53#else
54 0LL, 0LL, 0LL, 0LL, 0LL
55#endif
56 );
52} 57}
53 58
54static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu, u64 now) 59static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu, u64 now)
@@ -171,7 +176,7 @@ static int sched_debug_show(struct seq_file *m, void *v)
171 u64 now = ktime_to_ns(ktime_get()); 176 u64 now = ktime_to_ns(ktime_get());
172 int cpu; 177 int cpu;
173 178
174 SEQ_printf(m, "Sched Debug Version: v0.05, %s %.*s\n", 179 SEQ_printf(m, "Sched Debug Version: v0.05-v20, %s %.*s\n",
175 init_utsname()->release, 180 init_utsname()->release,
176 (int)strcspn(init_utsname()->version, " "), 181 (int)strcspn(init_utsname()->version, " "),
177 init_utsname()->version); 182 init_utsname()->version);
@@ -235,21 +240,24 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
235#define P(F) \ 240#define P(F) \
236 SEQ_printf(m, "%-25s:%20Ld\n", #F, (long long)p->F) 241 SEQ_printf(m, "%-25s:%20Ld\n", #F, (long long)p->F)
237 242
238 P(se.wait_start); 243 P(se.wait_runtime);
239 P(se.wait_start_fair); 244 P(se.wait_start_fair);
240 P(se.exec_start); 245 P(se.exec_start);
241 P(se.sleep_start);
242 P(se.sleep_start_fair); 246 P(se.sleep_start_fair);
247 P(se.sum_exec_runtime);
248
249#ifdef CONFIG_SCHEDSTATS
250 P(se.wait_start);
251 P(se.sleep_start);
243 P(se.block_start); 252 P(se.block_start);
244 P(se.sleep_max); 253 P(se.sleep_max);
245 P(se.block_max); 254 P(se.block_max);
246 P(se.exec_max); 255 P(se.exec_max);
247 P(se.wait_max); 256 P(se.wait_max);
248 P(se.wait_runtime);
249 P(se.wait_runtime_overruns); 257 P(se.wait_runtime_overruns);
250 P(se.wait_runtime_underruns); 258 P(se.wait_runtime_underruns);
251 P(se.sum_wait_runtime); 259 P(se.sum_wait_runtime);
252 P(se.sum_exec_runtime); 260#endif
253 SEQ_printf(m, "%-25s:%20Ld\n", 261 SEQ_printf(m, "%-25s:%20Ld\n",
254 "nr_switches", (long long)(p->nvcsw + p->nivcsw)); 262 "nr_switches", (long long)(p->nvcsw + p->nivcsw));
255 P(se.load.weight); 263 P(se.load.weight);
@@ -269,7 +277,9 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
269 277
270void proc_sched_set_task(struct task_struct *p) 278void proc_sched_set_task(struct task_struct *p)
271{ 279{
280#ifdef CONFIG_SCHEDSTATS
272 p->se.sleep_max = p->se.block_max = p->se.exec_max = p->se.wait_max = 0; 281 p->se.sleep_max = p->se.block_max = p->se.exec_max = p->se.wait_max = 0;
273 p->se.wait_runtime_overruns = p->se.wait_runtime_underruns = 0; 282 p->se.wait_runtime_overruns = p->se.wait_runtime_underruns = 0;
283#endif
274 p->se.sum_exec_runtime = 0; 284 p->se.sum_exec_runtime = 0;
275} 285}