]> err.no Git - linux-2.6/blobdiff - kernel/time/timer_stats.c
[POWERPC] Fix handling of unrecoverable SLB miss interrupts
[linux-2.6] / kernel / time / timer_stats.c
index 9b8a826236ddc4e4c3642f959d5186b52fa51269..417da8c5bc7248018d915f40d0aedfa579679e8a 100644 (file)
@@ -26,7 +26,7 @@
  * the pid and cmdline from the owner process if applicable.
  *
  * Start/stop data collection:
- * # echo 1[0] >/proc/timer_stats
+ * # echo [1|0] >/proc/timer_stats
  *
  * Display the information collected so far:
  * # cat /proc/timer_stats
@@ -269,7 +269,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
 
 static void print_name_offset(struct seq_file *m, unsigned long addr)
 {
-       char symname[KSYM_NAME_LEN+1];
+       char symname[KSYM_NAME_LEN];
 
        if (lookup_symbol_name(addr, symname) < 0)
                seq_printf(m, "<%p>", (void *)addr);
@@ -327,8 +327,9 @@ static int tstats_show(struct seq_file *m, void *v)
                ms = 1;
 
        if (events && period.tv_sec)
-               seq_printf(m, "%ld total events, %ld.%ld events/sec\n", events,
-                          events / period.tv_sec, events * 1000 / ms);
+               seq_printf(m, "%ld total events, %ld.%03ld events/sec\n",
+                          events, events * 1000 / ms,
+                          (events * 1000000 / ms) % 1000);
        else
                seq_printf(m, "%ld total events\n", events);
 
@@ -399,7 +400,7 @@ static struct file_operations tstats_fops = {
        .read           = seq_read,
        .write          = tstats_write,
        .llseek         = seq_lseek,
-       .release        = seq_release,
+       .release        = single_release,
 };
 
 void __init init_timer_stats(void)