diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-20 03:03:38 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-20 03:03:38 -0500 |
| commit | 90accd6fabf9b2fa2705945a4c601877a75d43bf (patch) | |
| tree | d393cb54f0228b1313139e4e14adf4f5cf236b59 /kernel/sched_debug.c | |
| parent | b43d196c4d3fe46d6dda7c987c47792612b80b1b (diff) | |
| parent | ee2f6cc7f9ea2542ad46070ed62ba7aa04d08871 (diff) | |
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'kernel/sched_debug.c')
| -rw-r--r-- | kernel/sched_debug.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index ad958c1ec708..26ed8e3d1c15 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 | ||
| @@ -319,7 +320,7 @@ static int __init init_sched_debug_procfs(void) | |||
| 319 | { | 320 | { |
| 320 | struct proc_dir_entry *pe; | 321 | struct proc_dir_entry *pe; |
| 321 | 322 | ||
| 322 | pe = proc_create("sched_debug", 0644, NULL, &sched_debug_fops); | 323 | pe = proc_create("sched_debug", 0444, NULL, &sched_debug_fops); |
| 323 | if (!pe) | 324 | if (!pe) |
| 324 | return -ENOMEM; | 325 | return -ENOMEM; |
| 325 | return 0; | 326 | return 0; |
| @@ -422,10 +423,11 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
| 422 | #undef __P | 423 | #undef __P |
| 423 | 424 | ||
| 424 | { | 425 | { |
| 426 | unsigned int this_cpu = raw_smp_processor_id(); | ||
| 425 | u64 t0, t1; | 427 | u64 t0, t1; |
| 426 | 428 | ||
| 427 | t0 = sched_clock(); | 429 | t0 = cpu_clock(this_cpu); |
| 428 | t1 = sched_clock(); | 430 | t1 = cpu_clock(this_cpu); |
| 429 | SEQ_printf(m, "%-35s:%21Ld\n", | 431 | SEQ_printf(m, "%-35s:%21Ld\n", |
| 430 | "clock-delta", (long long)(t1-t0)); | 432 | "clock-delta", (long long)(t1-t0)); |
| 431 | } | 433 | } |
