Messages in this thread | | | Date | Sat, 26 Jul 2008 14:40:58 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 1/2] ftrace: single CPU tracers use CPU clock |
| |
* Steven Rostedt <rostedt@goodmis.org> wrote:
> The current ftrace clock uses the sched_clock.c code. This code tries > to handle cases where the TSC is out of sync between different CPUs. > Unfortunately, even with insync TSCs, due to drifts between the CPU > clock and the GTOD clock, we might get some inaccuracy in a single CPU > trace. > > Some tracers (irqsoff, preemptoff, preempirqsoff) only care about a > trace on a single CPU. This patch changes the ftrace_now (the clock > reader) from a function call to a function variable. On initialization > of a tracer, the tracer will be allowed to choose which type of clock > to use. > > Now the irqsoff, preemptoff and preemptirqs off tracers can have > accurate traces with the local CPU clock without affecting the tracers > that want the modified clock that tries to keep the different CPU > clock reads in sync.
this is not a good idea. We want to fix cpu_clock(), not work around any deficiencies it might have.
Ingo
| |