Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91101
b: refs/heads/master
c: 7ba2e74
h: refs/heads/master
i:
  91099: 933455e
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 19, 2008
1 parent f0ad530 commit f088a31
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f1bc385cfbab474db6c27b5af1e439614f3025c
refs/heads/master: 7ba2e74ab5a0518bc953042952dd165724bc70c9
27 changes: 27 additions & 0 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,13 +1611,40 @@ static const struct sched_class fair_sched_class = {
};

#ifdef CONFIG_SCHED_DEBUG
static void
print_cfs_rq_tasks(struct seq_file *m, struct cfs_rq *cfs_rq, int depth)
{
struct sched_entity *se;

if (!cfs_rq)
return;

list_for_each_entry_rcu(se, &cfs_rq->tasks, group_node) {
int i;

for (i = depth; i; i--)
seq_puts(m, " ");

seq_printf(m, "%lu %s %lu\n",
se->load.weight,
entity_is_task(se) ? "T" : "G",
calc_delta_weight(SCHED_LOAD_SCALE, se)
);
if (!entity_is_task(se))
print_cfs_rq_tasks(m, group_cfs_rq(se), depth + 1);
}
}

static void print_cfs_stats(struct seq_file *m, int cpu)
{
struct cfs_rq *cfs_rq;

rcu_read_lock();
for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
print_cfs_rq(m, cpu, cfs_rq);

seq_printf(m, "\nWeight tree:\n");
print_cfs_rq_tasks(m, &cpu_rq(cpu)->cfs, 1);
rcu_read_unlock();
}
#endif

0 comments on commit f088a31

Please sign in to comment.