On Mon, 2009-04-20 at 15:10 +0200, Ralf Baechle wrote: > On Mon, Apr 20, 2009 at 10:01:55AM +0200, Ralf Baechle wrote: > > > > I have divided ftrace to several commits in the above git tree, hope you > > > can check it, thx :-) > > > > > > in addition to the static/dynamic/graph function tracer & system call > > > tracer implementation, a mips specific ring_buffer_time_stamp > > > (kernel/trace/ring_buffer.c) is also implemented to get 1us precision > > > time, this is very important to make ftrace available in mips, > > > otherwise, we can only get 1ms precision time for the original > > > ring_buffer_time_stamp is based on sched_clock(jiffies based). > > > > > > perhaps we can implement a more precise sched_clock directly, just as > > > x86 does(native_sched_clock, tsc based), but in mips, there is only a > > > 32bit timer count which will quickly overflow, so it will need an extra > > > overflow protection, which may influence the other parts of the kernel. > > > > My git clone is still running to I'm commenting only on the patches you > > posted earlier. #ifdef-MIPS'ing things into the generic kernel code > > definately won't be an acceptable way to get µs resolution. > just fix it via moving mips specific ring_buffer_time_stamp to arch/mips/kernel/ftrace.c via defining the original one as __attribute__(weak). in arch/mips/kernel/ftrace.c: u64 native_ring_buffer_time_stamp(...) { ... } u64 ring_buffer_time_stamp(...) __attribute__((alias("native_ring_buffer_time_stamp"))); in kernel/trace/ring_buffer.c: -u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu) + u64 __attribute__((weak)) ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu) *** not push to the git tree yet. > In changeset e67f78d663a84ef93aa12c3c8c1adf3033c4f9a1 you introduce > <asm/rwsem.h> but because RWSEM_GENERIC_SPINLOCK is always set that file > won't ever be included. > Yes, currently, I'm trying to fix it. > Ralf