From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: rostedt@goodmis.org, 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: Wed, 21 Oct 2009 21:20:11 +0800 [thread overview]
Message-ID: <1256131211.11274.1.camel@falcon> (raw)
In-Reply-To: <4ADF093D.10403@ru.mvista.com>
On Wed, 2009-10-21 at 17:14 +0400, Sergei Shtylyov wrote:
> Hello.
>
> Steven Rostedt wrote:
>
> >>Need to check which registers is missing when saving/restoring for
> >>_mcount:
>
> >>NESTED(ftrace_graph_caller, PT_SIZE, ra)
> >> MCOUNT_SAVE_REGS
> >> PTR_S v0, PT_R2(sp)
> >>
> >> MCOUNT_SET_ARGS
> >> jal prepare_ftrace_return
> >> nop
> >>
> >> /* overwrite the parent as &return_to_handler: v0 -> $1(at) */
> >> move $1, v0
>
> > I'm confused here? I'm not exactly sure what the above is doing. Is $1 a
> > register (AT)?
>
> Yes.
Have replaced it by AT, thanks!
>
> > And how is this register used before calling mcount?
>
> >> PTR_L v0, PT_R2(sp)
> >> MCOUNT_RESTORE_REGS
> >> RETURN_BACK
> >> END(ftrace_graph_caller)
>
> >> .align 2
> >> .globl return_to_handler
> >>return_to_handler:
> >> PTR_SUBU sp, PT_SIZE
> >> PTR_S v0, PT_R2(sp)
>
> > BTW, is v0 the only return register? I know x86 can return two different
> > registers depending on what it returns. What happens if a function
> > returns a 64 bit value on a 32bit box? Does it use two registers for
> > that?
>
> Yes, there's also v1 register.
>
Thanks, added.
Regards,
Wu Zhangjin
prev parent reply other threads:[~2009-10-21 13:20 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 ` ftrace for MIPS Wu Zhangjin
2009-10-20 16:21 ` Steven Rostedt
2009-10-21 2:33 ` Wu Zhangjin
2009-10-21 2:48 ` Steven Rostedt
2009-10-21 13:14 ` Sergei Shtylyov
2009-10-21 13:20 ` Wu Zhangjin [this message]
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=1256131211.11274.1.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=der.herr@hofr.at \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rostedt@goodmis.org \
--cc=sshtylyov@ru.mvista.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.