mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: wuzhangjin@gmail.com
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Nicholas Mc Guire <der.herr@hofr.at>,
	Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: ftrace for MIPS
Date: Tue, 20 Oct 2009 22:48:06 -0400	[thread overview]
Message-ID: <1256093286.18347.2245.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <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



  reply	other threads:[~2009-10-21  2:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1255995599.17795.15.camel@falcon>
     [not found] ` <1255997319.18347.576.camel@gandalf.stny.rr.com>
2009-10-20 15:31   ` Wu Zhangjin
2009-10-20 16:21     ` Steven Rostedt
2009-10-21  2:33       ` Wu Zhangjin
2009-10-21  2:48         ` Steven Rostedt [this message]
2009-10-21 13:14       ` Sergei Shtylyov
2009-10-21 13:20         ` Wu Zhangjin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256093286.18347.2245.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=der.herr@hofr.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    --cc=wuzhangjin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®