diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-03-27 07:55:44 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 14:43:06 +0200 |
commit | a5dec5573f3c7e63f2f9b5852b9759ea342a5ff9 (patch) | |
tree | 5d5cb96136fc304bc01bc9cfeb072a6ab86230be /kernel/trace/trace_boot.c | |
parent | Merge branch 'tracing/urgent' into tracing/ftrace (diff) | |
download | linux-a5dec5573f3c7e63f2f9b5852b9759ea342a5ff9.tar.xz linux-a5dec5573f3c7e63f2f9b5852b9759ea342a5ff9.zip |
tracing: use macros to denote usec and nsec per second
Impact: cleanup
Use USEC_PER_SEC and NSEC_PER_SEC instead of 1000000 and 1000000000.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <49CC7870.9000309@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_boot.c')
-rw-r--r-- | kernel/trace/trace_boot.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index 7a30fc4c3642..a29ef23ffb47 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c @@ -9,6 +9,7 @@ #include <linux/debugfs.h> #include <linux/ftrace.h> #include <linux/kallsyms.h> +#include <linux/time.h> #include "trace.h" #include "trace_output.h" @@ -67,7 +68,7 @@ initcall_call_print_line(struct trace_iterator *iter) trace_assign_type(field, entry); call = &field->boot_call; ts = iter->ts; - nsec_rem = do_div(ts, 1000000000); + nsec_rem = do_div(ts, NSEC_PER_SEC); ret = trace_seq_printf(s, "[%5ld.%09ld] calling %s @ %i\n", (unsigned long)ts, nsec_rem, call->func, call->caller); @@ -92,7 +93,7 @@ initcall_ret_print_line(struct trace_iterator *iter) trace_assign_type(field, entry); init_ret = &field->boot_ret; ts = iter->ts; - nsec_rem = do_div(ts, 1000000000); + nsec_rem = do_div(ts, NSEC_PER_SEC); ret = trace_seq_printf(s, "[%5ld.%09ld] initcall %s " "returned %d after %llu msecs\n", |