aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-10-15 11:00:05 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-15 11:00:05 -0400
commit67e12eac328b276dca7e61640632ed996ff1a93a (patch)
tree9e01b55090bbcbebe5880ca8b1afb2b9e2d2efd9 /kernel/sched_debug.c
parentaeb73b040399f94698b4f64dd058cae39187e18d (diff)
sched: add se->vruntime debugging
debug se->vruntime fields. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Mike Galbraith <efault@gmx.de>
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r--kernel/sched_debug.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 6b789dae7fdf..75ccf7aa98f3 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -44,7 +44,8 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
44 (long long)(p->nvcsw + p->nivcsw), 44 (long long)(p->nvcsw + p->nivcsw),
45 p->prio); 45 p->prio);
46#ifdef CONFIG_SCHEDSTATS 46#ifdef CONFIG_SCHEDSTATS
47 SEQ_printf(m, "%15Ld %15Ld %15Ld %15Ld %15Ld\n", 47 SEQ_printf(m, "%15Ld %15Ld %15Ld %15Ld %15Ld %15Ld\n",
48 (long long)p->se.vruntime,
48 (long long)p->se.sum_exec_runtime, 49 (long long)p->se.sum_exec_runtime,
49 (long long)p->se.sum_wait_runtime, 50 (long long)p->se.sum_wait_runtime,
50 (long long)p->se.sum_sleep_runtime, 51 (long long)p->se.sum_sleep_runtime,
@@ -64,10 +65,10 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
64 "\nrunnable tasks:\n" 65 "\nrunnable tasks:\n"
65 " task PID tree-key delta waiting" 66 " task PID tree-key delta waiting"
66 " switches prio" 67 " switches prio"
67 " sum-exec sum-wait sum-sleep" 68 " exec-runtime sum-exec sum-wait sum-sleep"
68 " wait-overrun wait-underrun\n" 69 " wait-overrun wait-underrun\n"
69 "------------------------------------------------------------------" 70 "------------------------------------------------------------------"
70 "----------------" 71 "--------------------------------"
71 "------------------------------------------------" 72 "------------------------------------------------"
72 "--------------------------------\n"); 73 "--------------------------------\n");
73 74
@@ -108,6 +109,11 @@ print_cfs_rq_runtime_sum(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
108 109
109void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) 110void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
110{ 111{
112 s64 MIN_vruntime = -1, max_vruntime = -1, spread;
113 struct rq *rq = &per_cpu(runqueues, cpu);
114 struct sched_entity *last;
115 unsigned long flags;
116
111 SEQ_printf(m, "\ncfs_rq\n"); 117 SEQ_printf(m, "\ncfs_rq\n");
112 118
113#define P(x) \ 119#define P(x) \
@@ -115,6 +121,23 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
115 121
116 P(fair_clock); 122 P(fair_clock);
117 P(exec_clock); 123 P(exec_clock);
124 P(min_vruntime);
125
126 spin_lock_irqsave(&rq->lock, flags);
127 if (cfs_rq->rb_leftmost)
128 MIN_vruntime = (__pick_next_entity(cfs_rq))->vruntime;
129 last = __pick_last_entity(cfs_rq);
130 if (last)
131 max_vruntime = last->vruntime;
132 spin_unlock_irqrestore(&rq->lock, flags);
133 SEQ_printf(m, " .%-30s: %Ld\n", "MIN_vruntime",
134 (long long)MIN_vruntime);
135 SEQ_printf(m, " .%-30s: %Ld\n", "max_vruntime",
136 (long long)max_vruntime);
137 spread = max_vruntime - MIN_vruntime;
138 SEQ_printf(m, " .%-30s: %Ld\n", "spread",
139 (long long)spread);
140
118 P(wait_runtime); 141 P(wait_runtime);
119 P(wait_runtime_overruns); 142 P(wait_runtime_overruns);
120 P(wait_runtime_underruns); 143 P(wait_runtime_underruns);
@@ -243,6 +266,7 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
243 P(se.wait_start_fair); 266 P(se.wait_start_fair);
244 P(se.exec_start); 267 P(se.exec_start);
245 P(se.sleep_start_fair); 268 P(se.sleep_start_fair);
269 P(se.vruntime);
246 P(se.sum_exec_runtime); 270 P(se.sum_exec_runtime);
247 271
248#ifdef CONFIG_SCHEDSTATS 272#ifdef CONFIG_SCHEDSTATS