Re: [PATCH -v4 9/9] tracing: add function graph tracer support forMIPS
From: David Daney
Date: Wed Oct 21 2009 - 14:26:32 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/