aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-06-19 08:22:24 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-20 04:25:59 -0400
commitada18de2eb76961a4d4847f63291744c9e7beec4 (patch)
tree2626852c3d735aea1a49570afea3fa936a8186dc /kernel/sched_debug.c
parent1cdad71537b42d0f0bf247772942ce678e4e8898 (diff)
sched: debug: add some rt debug output
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: "Daniel K." <dk@uw.no> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r--kernel/sched_debug.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 8bb713040ac..8e077b9c91c 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -119,9 +119,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
119 struct sched_entity *last; 119 struct sched_entity *last;
120 unsigned long flags; 120 unsigned long flags;
121 121
122#if !defined(CONFIG_CGROUP_SCHED) || !defined(CONFIG_USER_SCHED) 122#if defined(CONFIG_CGROUP_SCHED) && defined(CONFIG_FAIR_GROUP_SCHED)
123 SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu);
124#else
125 char path[128] = ""; 123 char path[128] = "";
126 struct cgroup *cgroup = NULL; 124 struct cgroup *cgroup = NULL;
127 struct task_group *tg = cfs_rq->tg; 125 struct task_group *tg = cfs_rq->tg;
@@ -133,6 +131,8 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
133 cgroup_path(cgroup, path, sizeof(path)); 131 cgroup_path(cgroup, path, sizeof(path));
134 132
135 SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path); 133 SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path);
134#else
135 SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu);
136#endif 136#endif
137 137
138 SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "exec_clock", 138 SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "exec_clock",
@@ -169,6 +169,39 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
169 cfs_rq->nr_spread_over); 169 cfs_rq->nr_spread_over);
170} 170}
171 171
172void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
173{
174#if defined(CONFIG_CGROUP_SCHED) && defined(CONFIG_RT_GROUP_SCHED)
175 char path[128] = "";
176 struct cgroup *cgroup = NULL;
177 struct task_group *tg = rt_rq->tg;
178
179 if (tg)
180 cgroup = tg->css.cgroup;
181
182 if (cgroup)
183 cgroup_path(cgroup, path, sizeof(path));
184
185 SEQ_printf(m, "\nrt_rq[%d]:%s\n", cpu, path);
186#else
187 SEQ_printf(m, "\nrt_rq[%d]:\n", cpu);
188#endif
189
190
191#define P(x) \
192 SEQ_printf(m, " .%-30s: %Ld\n", #x, (long long)(rt_rq->x))
193#define PN(x) \
194 SEQ_printf(m, " .%-30s: %Ld.%06ld\n", #x, SPLIT_NS(rt_rq->x))
195
196 P(rt_nr_running);
197 P(rt_throttled);
198 PN(rt_time);
199 PN(rt_runtime);
200
201#undef PN
202#undef P
203}
204
172static void print_cpu(struct seq_file *m, int cpu) 205static void print_cpu(struct seq_file *m, int cpu)
173{ 206{
174 struct rq *rq = &per_cpu(runqueues, cpu); 207 struct rq *rq = &per_cpu(runqueues, cpu);
@@ -208,6 +241,7 @@ static void print_cpu(struct seq_file *m, int cpu)
208#undef PN 241#undef PN
209 242
210 print_cfs_stats(m, cpu); 243 print_cfs_stats(m, cpu);
244 print_rt_stats(m, cpu);
211 245
212 print_rq(m, rq, cpu); 246 print_rq(m, rq, cpu);
213} 247}