diff options
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r-- | kernel/sched_debug.c | 31 |
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 | ||
253 | extern __read_mostly int sched_clock_running; | ||
254 | |||
253 | static void print_cpu(struct seq_file *m, int cpu) | 255 | static 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 | ||
322 | static int sched_debug_show(struct seq_file *m, void *v) | 324 | static 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); |