diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:20:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:42:31 -0400 |
commit | 750ed1a40783432d0dcb0e6c2e813a12615d7664 (patch) | |
tree | dc2d0eae703ec2ad3fe9a5bc657da5dbe0af2385 /kernel/trace/trace.c | |
parent | 4bf39a9411a4ce8712954e03a9bd1592ee345919 (diff) |
ftrace: timestamp syncing, prepare
rename and uninline now() to ftrace_now().
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 4550afda9607..e3778ab0d3f7 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -42,6 +42,11 @@ ns2usecs(cycle_t nsec) | |||
42 | return nsec; | 42 | return nsec; |
43 | } | 43 | } |
44 | 44 | ||
45 | notrace cycle_t ftrace_now(int cpu) | ||
46 | { | ||
47 | return cpu_clock(cpu); | ||
48 | } | ||
49 | |||
45 | static atomic_t tracer_counter; | 50 | static atomic_t tracer_counter; |
46 | static struct trace_array global_trace; | 51 | static struct trace_array global_trace; |
47 | 52 | ||
@@ -607,7 +612,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags) | |||
607 | entry->idx = atomic_inc_return(&tracer_counter); | 612 | entry->idx = atomic_inc_return(&tracer_counter); |
608 | entry->preempt_count = pc & 0xff; | 613 | entry->preempt_count = pc & 0xff; |
609 | entry->pid = tsk->pid; | 614 | entry->pid = tsk->pid; |
610 | entry->t = now(raw_smp_processor_id()); | 615 | entry->t = ftrace_now(raw_smp_processor_id()); |
611 | entry->flags = (irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) | | 616 | entry->flags = (irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) | |
612 | ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) | | 617 | ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) | |
613 | ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | | 618 | ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | |