mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
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>
This commit is contained in:
parent
f7160c7573
commit
5ac5c4d604
2 changed files with 22 additions and 21 deletions
|
@ -399,7 +399,7 @@ struct cfs_rq {
|
||||||
*/
|
*/
|
||||||
struct sched_entity *curr, *next, *last;
|
struct sched_entity *curr, *next, *last;
|
||||||
|
|
||||||
unsigned long nr_spread_over;
|
unsigned int nr_spread_over;
|
||||||
|
|
||||||
#ifdef CONFIG_FAIR_GROUP_SCHED
|
#ifdef CONFIG_FAIR_GROUP_SCHED
|
||||||
struct rq *rq; /* cpu runqueue to which this cfs_rq is attached */
|
struct rq *rq; /* cpu runqueue to which this cfs_rq is attached */
|
||||||
|
|
|
@ -144,7 +144,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
|
||||||
last = __pick_last_entity(cfs_rq);
|
last = __pick_last_entity(cfs_rq);
|
||||||
if (last)
|
if (last)
|
||||||
max_vruntime = last->vruntime;
|
max_vruntime = last->vruntime;
|
||||||
min_vruntime = rq->cfs.min_vruntime;
|
min_vruntime = cfs_rq->min_vruntime;
|
||||||
rq0_min_vruntime = per_cpu(runqueues, 0).cfs.min_vruntime;
|
rq0_min_vruntime = per_cpu(runqueues, 0).cfs.min_vruntime;
|
||||||
spin_unlock_irqrestore(&rq->lock, flags);
|
spin_unlock_irqrestore(&rq->lock, flags);
|
||||||
SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "MIN_vruntime",
|
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)
|
||||||
SPLIT_NS(spread0));
|
SPLIT_NS(spread0));
|
||||||
SEQ_printf(m, " .%-30s: %ld\n", "nr_running", cfs_rq->nr_running);
|
SEQ_printf(m, " .%-30s: %ld\n", "nr_running", cfs_rq->nr_running);
|
||||||
SEQ_printf(m, " .%-30s: %ld\n", "load", cfs_rq->load.weight);
|
SEQ_printf(m, " .%-30s: %ld\n", "load", cfs_rq->load.weight);
|
||||||
#ifdef CONFIG_SCHEDSTATS
|
|
||||||
#define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n);
|
|
||||||
|
|
||||||
P(yld_exp_empty);
|
SEQ_printf(m, " .%-30s: %d\n", "nr_spread_over",
|
||||||
P(yld_act_empty);
|
|
||||||
P(yld_both_empty);
|
|
||||||
P(yld_count);
|
|
||||||
|
|
||||||
P(sched_switch);
|
|
||||||
P(sched_count);
|
|
||||||
P(sched_goidle);
|
|
||||||
|
|
||||||
P(ttwu_count);
|
|
||||||
P(ttwu_local);
|
|
||||||
|
|
||||||
P(bkl_count);
|
|
||||||
|
|
||||||
#undef P
|
|
||||||
#endif
|
|
||||||
SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over",
|
|
||||||
cfs_rq->nr_spread_over);
|
cfs_rq->nr_spread_over);
|
||||||
#ifdef CONFIG_FAIR_GROUP_SCHED
|
#ifdef CONFIG_FAIR_GROUP_SCHED
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
@ -260,6 +242,25 @@ static void print_cpu(struct seq_file *m, int cpu)
|
||||||
#undef P
|
#undef P
|
||||||
#undef PN
|
#undef PN
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHEDSTATS
|
||||||
|
#define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n);
|
||||||
|
|
||||||
|
P(yld_exp_empty);
|
||||||
|
P(yld_act_empty);
|
||||||
|
P(yld_both_empty);
|
||||||
|
P(yld_count);
|
||||||
|
|
||||||
|
P(sched_switch);
|
||||||
|
P(sched_count);
|
||||||
|
P(sched_goidle);
|
||||||
|
|
||||||
|
P(ttwu_count);
|
||||||
|
P(ttwu_local);
|
||||||
|
|
||||||
|
P(bkl_count);
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
#endif
|
||||||
print_cfs_stats(m, cpu);
|
print_cfs_stats(m, cpu);
|
||||||
print_rt_stats(m, cpu);
|
print_rt_stats(m, cpu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue