diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-11-10 04:46:32 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-10 04:51:51 -0500 |
commit | 5ac5c4d604bf894ef672a7971d03fefdc7ea7e49 (patch) | |
tree | ee7b71de46c0c71dec9e9ebb0efd2e66ce1c7a6d | |
parent | f7160c7573615ec82c691e294cf80d920b5d588d (diff) |
sched: clean up debug info
Impact: clean up and fix debug info printout
While looking over the sched_debug code I noticed that we printed the rq
schedstats for every cfs_rq, ammend this.
Also change nr_spead_over into an int, and fix a little buglet in
min_vruntime printing.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | kernel/sched_debug.c | 41 |
2 files changed, 22 insertions, 21 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 57c933ffbee1..f3149244e324 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -399,7 +399,7 @@ struct cfs_rq { | |||
399 | */ | 399 | */ |
400 | struct sched_entity *curr, *next, *last; | 400 | struct sched_entity *curr, *next, *last; |
401 | 401 | ||
402 | unsigned long nr_spread_over; | 402 | unsigned int nr_spread_over; |
403 | 403 | ||
404 | #ifdef CONFIG_FAIR_GROUP_SCHED | 404 | #ifdef CONFIG_FAIR_GROUP_SCHED |
405 | struct rq *rq; /* cpu runqueue to which this cfs_rq is attached */ | 405 | struct rq *rq; /* cpu runqueue to which this cfs_rq is attached */ |
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 5ae17762ec32..48ecc51e7701 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -144,7 +144,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
144 | last = __pick_last_entity(cfs_rq); | 144 | last = __pick_last_entity(cfs_rq); |
145 | if (last) | 145 | if (last) |
146 | max_vruntime = last->vruntime; | 146 | max_vruntime = last->vruntime; |
147 | min_vruntime = rq->cfs.min_vruntime; | 147 | min_vruntime = cfs_rq->min_vruntime; |
148 | rq0_min_vruntime = per_cpu(runqueues, 0).cfs.min_vruntime; | 148 | rq0_min_vruntime = per_cpu(runqueues, 0).cfs.min_vruntime; |
149 | spin_unlock_irqrestore(&rq->lock, flags); | 149 | spin_unlock_irqrestore(&rq->lock, flags); |
150 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "MIN_vruntime", | 150 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "MIN_vruntime", |
@@ -161,26 +161,8 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
161 | SPLIT_NS(spread0)); | 161 | SPLIT_NS(spread0)); |
162 | SEQ_printf(m, " .%-30s: %ld\n", "nr_running", cfs_rq->nr_running); | 162 | SEQ_printf(m, " .%-30s: %ld\n", "nr_running", cfs_rq->nr_running); |
163 | SEQ_printf(m, " .%-30s: %ld\n", "load", cfs_rq->load.weight); | 163 | SEQ_printf(m, " .%-30s: %ld\n", "load", cfs_rq->load.weight); |
164 | #ifdef CONFIG_SCHEDSTATS | ||
165 | #define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n); | ||
166 | |||
167 | P(yld_exp_empty); | ||
168 | P(yld_act_empty); | ||
169 | P(yld_both_empty); | ||
170 | P(yld_count); | ||
171 | 164 | ||
172 | P(sched_switch); | 165 | SEQ_printf(m, " .%-30s: %d\n", "nr_spread_over", |
173 | P(sched_count); | ||
174 | P(sched_goidle); | ||
175 | |||
176 | P(ttwu_count); | ||
177 | P(ttwu_local); | ||
178 | |||
179 | P(bkl_count); | ||
180 | |||
181 | #undef P | ||
182 | #endif | ||
183 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", | ||
184 | cfs_rq->nr_spread_over); | 166 | cfs_rq->nr_spread_over); |
185 | #ifdef CONFIG_FAIR_GROUP_SCHED | 167 | #ifdef CONFIG_FAIR_GROUP_SCHED |
186 | #ifdef CONFIG_SMP | 168 | #ifdef CONFIG_SMP |
@@ -260,6 +242,25 @@ static void print_cpu(struct seq_file *m, int cpu) | |||
260 | #undef P | 242 | #undef P |
261 | #undef PN | 243 | #undef PN |
262 | 244 | ||
245 | #ifdef CONFIG_SCHEDSTATS | ||
246 | #define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n); | ||
247 | |||
248 | P(yld_exp_empty); | ||
249 | P(yld_act_empty); | ||
250 | P(yld_both_empty); | ||
251 | P(yld_count); | ||
252 | |||
253 | P(sched_switch); | ||
254 | P(sched_count); | ||
255 | P(sched_goidle); | ||
256 | |||
257 | P(ttwu_count); | ||
258 | P(ttwu_local); | ||
259 | |||
260 | P(bkl_count); | ||
261 | |||
262 | #undef P | ||
263 | #endif | ||
263 | print_cfs_stats(m, cpu); | 264 | print_cfs_stats(m, cpu); |
264 | print_rt_stats(m, cpu); | 265 | print_rt_stats(m, cpu); |
265 | 266 | ||