Thread (28 messages) flat view 28 messages, 6 authors, 2009-02-13

Re: [PATCH 3/7][RFC] powerpc64, tracing: add function graph tracer with dynamic tracing

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2009-02-13 05:23:04
Also in: lkml

On Fri, 13 Feb 2009, Benjamin Herrenschmidt wrote:
quoted
@@ -55,8 +56,9 @@ static unsigned char *ftrace_call_replace(unsigned
long ip, unsigned long addr)
 	 */
 	addr = GET_ADDR(addr);
 
-	/* Set to "bl addr" */
-	op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc);
+	/* if (link) set op to 'bl' else 'b' */
+	op = 0x48000000 | (link ? 1 : 0);
+	op |= (ftrace_calc_offset(ip, addr) & 0x03fffffc);
Any reason why you aren't using the code in
arch/powerpc/lib/code-patching.c here ?
Yes, because I did not know about it ;-)

I'll write up a patch to change this. But I'll post this series as is for 
now.

Thanks,

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help