diff options
| author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-04-19 13:45:00 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:45:00 -0400 |
| commit | d19ca30874f2ad343d054e0b5c0576744afeecd4 (patch) | |
| tree | d22f35b7290fff3547d030893de1783695d9978b | |
| parent | 18d95a2832c1392a2d63227a7a6d433cb9f2037e (diff) | |
sched: debug: add some debug code to handle the full hierarchy
Add some extra debug output so we can get a better overview of the
full hierarchy.
We print the cgroup path after each cfs_rq, so we can see what group
we're looking at.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | kernel/sched_debug.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 3d09106990cb..be42548b67bb 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
| @@ -67,14 +67,24 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) | |||
| 67 | (long long)(p->nvcsw + p->nivcsw), | 67 | (long long)(p->nvcsw + p->nivcsw), |
| 68 | p->prio); | 68 | p->prio); |
| 69 | #ifdef CONFIG_SCHEDSTATS | 69 | #ifdef CONFIG_SCHEDSTATS |
| 70 | SEQ_printf(m, "%9Ld.%06ld %9Ld.%06ld %9Ld.%06ld\n", | 70 | SEQ_printf(m, "%9Ld.%06ld %9Ld.%06ld %9Ld.%06ld", |
| 71 | SPLIT_NS(p->se.vruntime), | 71 | SPLIT_NS(p->se.vruntime), |
| 72 | SPLIT_NS(p->se.sum_exec_runtime), | 72 | SPLIT_NS(p->se.sum_exec_runtime), |
| 73 | SPLIT_NS(p->se.sum_sleep_runtime)); | 73 | SPLIT_NS(p->se.sum_sleep_runtime)); |
| 74 | #else | 74 | #else |
| 75 | SEQ_printf(m, "%15Ld %15Ld %15Ld.%06ld %15Ld.%06ld %15Ld.%06ld\n", | 75 | SEQ_printf(m, "%15Ld %15Ld %15Ld.%06ld %15Ld.%06ld %15Ld.%06ld", |
| 76 | 0LL, 0LL, 0LL, 0L, 0LL, 0L, 0LL, 0L); | 76 | 0LL, 0LL, 0LL, 0L, 0LL, 0L, 0LL, 0L); |
| 77 | #endif | 77 | #endif |
| 78 | |||
| 79 | #ifdef CONFIG_CGROUP_SCHED | ||
| 80 | { | ||
| 81 | char path[64]; | ||
| 82 | |||
| 83 | cgroup_path(task_group(p)->css.cgroup, path, sizeof(path)); | ||
| 84 | SEQ_printf(m, " %s", path); | ||
| 85 | } | ||
| 86 | #endif | ||
| 87 | SEQ_printf(m, "\n"); | ||
| 78 | } | 88 | } |
| 79 | 89 | ||
| 80 | static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) | 90 | static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) |
| @@ -109,7 +119,21 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
| 109 | struct sched_entity *last; | 119 | struct sched_entity *last; |
| 110 | unsigned long flags; | 120 | unsigned long flags; |
| 111 | 121 | ||
| 112 | SEQ_printf(m, "\ncfs_rq\n"); | 122 | #ifndef CONFIG_CGROUP_SCHED |
| 123 | SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu); | ||
| 124 | #else | ||
| 125 | char path[128] = ""; | ||
| 126 | struct cgroup *cgroup = NULL; | ||
| 127 | struct task_group *tg = cfs_rq->tg; | ||
| 128 | |||
| 129 | if (tg) | ||
| 130 | cgroup = tg->css.cgroup; | ||
| 131 | |||
| 132 | if (cgroup) | ||
| 133 | cgroup_path(cgroup, path, sizeof(path)); | ||
| 134 | |||
| 135 | SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path); | ||
| 136 | #endif | ||
| 113 | 137 | ||
| 114 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "exec_clock", | 138 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "exec_clock", |
| 115 | SPLIT_NS(cfs_rq->exec_clock)); | 139 | SPLIT_NS(cfs_rq->exec_clock)); |
| @@ -143,6 +167,11 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
| 143 | #endif | 167 | #endif |
| 144 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", | 168 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", |
| 145 | cfs_rq->nr_spread_over); | 169 | cfs_rq->nr_spread_over); |
| 170 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
| 171 | #ifdef CONFIG_SMP | ||
| 172 | SEQ_printf(m, " .%-30s: %lu\n", "shares", cfs_rq->shares); | ||
| 173 | #endif | ||
| 174 | #endif | ||
| 146 | } | 175 | } |
| 147 | 176 | ||
| 148 | static void print_cpu(struct seq_file *m, int cpu) | 177 | static void print_cpu(struct seq_file *m, int cpu) |
