Re: [PATCH -v4 9/9] tracing: add function graph tracer support forMIPS

From: Steven Rostedt
Date: Thu Oct 22 2009 - 11:20:37 EST


On Thu, 2009-10-22 at 21:31 +0800, Wu Zhangjin wrote:

> > If we don't stop at just one save, but look for the saving of ra, it
> > should not fail.
> >
>
> We can not look for the saving of ra continuously(when should we stop?

When we hit something other than sw .... I'm sure we will get to
something other than a store. ;-)

> if with -fno-omit-fram-pointer, we have "move s8,sp" or "addiu sp, sp,
> -offset", but without it, we have no "guideboard" to know that is the
> beginning of the function!), 'Cause we may find the saving of ra of
> another function, which will fail at that time.

But that other function should have a jump to mcount before it, or some
other kind of return. A function that has _mcount attached, can not be
inlined. So something must have jumped to it. There should be no cases
where code from above just "falls" into the leaf function.

>
> BTW: Just replace probe_kernel_read() and tracing_stop/tracing_start by
> asm, it works in 32bit, but fails in 64bit, I'm trying to find why!(TLB
> miss on load or ifetch, will fix it asap! and resend the patchset out!)

Thanks!

-- Steve

Note, I'm going to try booting a vanilla kernel on the notebook. If it
works, I'll start applying your patches and playing with it too. But I
also have some other work to do first.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/