[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ADF5225.40701@caviumnetworks.com>
Date: Wed, 21 Oct 2009 11:25:41 -0700
From: David Daney <ddaney@...iumnetworks.com>
To: rostedt@...dmis.org
CC: Wu Zhangjin <wuzhangjin@...il.com>, linux-kernel@...r.kernel.org,
linux-mips@...ux-mips.org, Thomas Gleixner <tglx@...utronix.de>,
Ralf Baechle <ralf@...ux-mips.org>,
Nicholas Mc Guire <der.herr@...r.at>
Subject: Re: [PATCH -v4 9/9] tracing: add function graph tracer support for
MIPS
Steven Rostedt wrote:
[...]
> We're not doing back traces. We need to modify the return of the
> function being called. Note, the above functions that end with ";" are
> leaf functions. Non leaf functions show "{" and end with "}".
>
> The trick here is to find a reliable way to modify the return address.
>
Well that's what I get for chiming in without fully understanding the
context.
I think it is fine to search backwards from the ($ra - 8) of the call to
_mcount until you encounter the adjustment of $sp. If you encounter a
store of $ra, you can assume that the function will use the stored value
when returning, otherwise modify the value restored to $ra (passed in
$at). That is probably what you were doing to begin with.
David Daney
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists