[Top] [All Lists]

Re: ftrace for MIPS

Subject: Re: ftrace for MIPS
From: Steven Rostedt <>
Date: Tue, 20 Oct 2009 22:48:06 -0400
Cc: Thomas Gleixner <>, Nicholas Mc Guire <>, Ralf Baechle <>,,
In-reply-to: <1256092395.5482.32.camel@falcon>
Organization: Kihon Technologies Inc.
Original-recipient: rfc822;
References: <1255995599.17795.15.camel@falcon> <> <1256052667.8149.56.camel@falcon> <> <1256092395.5482.32.camel@falcon>
On Wed, 2009-10-21 at 10:33 +0800, Wu Zhangjin wrote:
> Hi, all
> Just made it(function graph tracer for MIPS) work :-)
> The problem is that: the stack offset should be from 0 to PT_SIZE(304),
> but I mask it with 0xff(256), which is totally wrong.
> Here is an example, the stack address of ra(return address) should be
> (s8 + ffbf0128 & 0xfff).
> ffffffff801dad10 <do_sync_read>:
> ffffffff801dad10:       67bdfed0        daddiu  sp,sp,-304
> ffffffff801dad14:       ffbe0120        sd      s8,288(sp)
> ffffffff801dad18:       03a0f02d        move    s8,sp
> ffffffff801dad1c:       ffbf0128        sd      ra,296(sp)
> ffffffff801dad20:       ffb30118        sd      s3,280(sp)
> ffffffff801dad24:       ffb20110        sd      s2,272(sp)
> ffffffff801dad28:       ffb10108        sd      s1,264(sp)
> ffffffff801dad2c:       ffb00100        sd      s0,256(sp)
> ffffffff801dad30:       03e0082d        move    at,ra
> ffffffff801dad34:       0c042ab0        jal     ffffffff8010aac0
> <_mcount>
> ffffffff801dad38:       00020021        nop
> Thanks! will send the patches out later.

Great to hear that it works! When I get my cross compiling working I'll
test out your patches.

I'll also probably update them to use the asm() over the probe and
tracing_disable(). That method is very inefficient.

Good work!

-- Steve

<Prev in Thread] Current Thread [Next in Thread>