aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-11-19 15:11:09 -0500
committerIngo Molnar <mingo@elte.hu>2010-11-23 04:29:08 -0500
commit5bb6b1ea67a73f0665a41726dd7138977b992c6c (patch)
treed16d962dded41088032250b24f0cbee735f3c97c /kernel/sched_debug.c
parent51a96c77815e7f139892a6e9c8275a50e9baebdf (diff)
sched: Add some clock info to sched_debug
Add more clock information to /proc/sched_debug, Thomas wanted to see the sched_clock_stable state. Requested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r--kernel/sched_debug.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index e6590e7312e8..e95b77414a99 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -250,6 +250,8 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
250#undef P 250#undef P
251} 251}
252 252
253extern __read_mostly int sched_clock_running;
254
253static void print_cpu(struct seq_file *m, int cpu) 255static void print_cpu(struct seq_file *m, int cpu)
254{ 256{
255 struct rq *rq = cpu_rq(cpu); 257 struct rq *rq = cpu_rq(cpu);
@@ -321,21 +323,42 @@ static const char *sched_tunable_scaling_names[] = {
321 323
322static int sched_debug_show(struct seq_file *m, void *v) 324static int sched_debug_show(struct seq_file *m, void *v)
323{ 325{
324 u64 now = ktime_to_ns(ktime_get()); 326 u64 ktime, sched_clk, cpu_clk;
327 unsigned long flags;
325 int cpu; 328 int cpu;
326 329
327 SEQ_printf(m, "Sched Debug Version: v0.09, %s %.*s\n", 330 local_irq_save(flags);
331 ktime = ktime_to_ns(ktime_get());
332 sched_clk = sched_clock();
333 cpu_clk = local_clock();
334 local_irq_restore(flags);
335
336 SEQ_printf(m, "Sched Debug Version: v0.10, %s %.*s\n",
328 init_utsname()->release, 337 init_utsname()->release,
329 (int)strcspn(init_utsname()->version, " "), 338 (int)strcspn(init_utsname()->version, " "),
330 init_utsname()->version); 339 init_utsname()->version);
331 340
332 SEQ_printf(m, "now at %Lu.%06ld msecs\n", SPLIT_NS(now)); 341#define P(x) \
342 SEQ_printf(m, "%-40s: %Ld\n", #x, (long long)(x))
343#define PN(x) \
344 SEQ_printf(m, "%-40s: %Ld.%06ld\n", #x, SPLIT_NS(x))
345 PN(ktime);
346 PN(sched_clk);
347 PN(cpu_clk);
348 P(jiffies);
349#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
350 P(sched_clock_stable);
351#endif
352#undef PN
353#undef P
354
355 SEQ_printf(m, "\n");
356 SEQ_printf(m, "sysctl_sched\n");
333 357
334#define P(x) \ 358#define P(x) \
335 SEQ_printf(m, " .%-40s: %Ld\n", #x, (long long)(x)) 359 SEQ_printf(m, " .%-40s: %Ld\n", #x, (long long)(x))
336#define PN(x) \ 360#define PN(x) \
337 SEQ_printf(m, " .%-40s: %Ld.%06ld\n", #x, SPLIT_NS(x)) 361 SEQ_printf(m, " .%-40s: %Ld.%06ld\n", #x, SPLIT_NS(x))
338 P(jiffies);
339 PN(sysctl_sched_latency); 362 PN(sysctl_sched_latency);
340 PN(sysctl_sched_min_granularity); 363 PN(sysctl_sched_min_granularity);
341 PN(sysctl_sched_wakeup_granularity); 364 PN(sysctl_sched_wakeup_granularity);