projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linus' into core/urgent
[cascardo/linux.git]
/
kernel
/
time
/
timer_stats.c
diff --git
a/kernel/time/timer_stats.c
b/kernel/time/timer_stats.c
index
3c38fb5
..
c994530
100644
(file)
--- a/
kernel/time/timer_stats.c
+++ b/
kernel/time/timer_stats.c
@@
-26,7
+26,7
@@
* the pid and cmdline from the owner process if applicable.
*
* Start/stop data collection:
* 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
*
* Display the information collected so far:
* # cat /proc/timer_stats
@@
-327,8
+327,9
@@
static int tstats_show(struct seq_file *m, void *v)
ms = 1;
if (events && period.tv_sec)
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);
else
seq_printf(m, "%ld total events\n", events);
@@
-414,12
+415,9
@@
static int __init init_tstats_procfs(void)
{
struct proc_dir_entry *pe;
{
struct proc_dir_entry *pe;
- pe =
create_proc_entry("timer_stats", 0644, NULL
);
+ pe =
proc_create("timer_stats", 0644, NULL, &tstats_fops
);
if (!pe)
return -ENOMEM;
if (!pe)
return -ENOMEM;
-
- pe->proc_fops = &tstats_fops;
-
return 0;
}
__initcall(init_tstats_procfs);
return 0;
}
__initcall(init_tstats_procfs);