|
@@ -77,6 +77,13 @@ ftrace_call:
|
|
nop /* a placeholder for the call to a real tracing function */
|
|
nop /* a placeholder for the call to a real tracing function */
|
|
move a1, AT /* arg2: the caller's next ip, parent */
|
|
move a1, AT /* arg2: the caller's next ip, parent */
|
|
|
|
|
|
|
|
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
|
|
+ .globl ftrace_graph_call
|
|
|
|
+ftrace_graph_call:
|
|
|
|
+ nop
|
|
|
|
+ nop
|
|
|
|
+#endif
|
|
|
|
+
|
|
MCOUNT_RESTORE_REGS
|
|
MCOUNT_RESTORE_REGS
|
|
.globl ftrace_stub
|
|
.globl ftrace_stub
|
|
ftrace_stub:
|
|
ftrace_stub:
|
|
@@ -124,10 +131,13 @@ ftrace_stub:
|
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
|
|
|
|
NESTED(ftrace_graph_caller, PT_SIZE, ra)
|
|
NESTED(ftrace_graph_caller, PT_SIZE, ra)
|
|
|
|
+#ifdef CONFIG_DYNAMIC_FTRACE
|
|
|
|
+ PTR_L a1, PT_R31(sp) /* load the original ra from the stack */
|
|
|
|
+#else
|
|
MCOUNT_SAVE_REGS
|
|
MCOUNT_SAVE_REGS
|
|
-
|
|
|
|
- PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
|
|
|
|
move a1, ra /* arg2: next ip, selfaddr */
|
|
move a1, ra /* arg2: next ip, selfaddr */
|
|
|
|
+#endif
|
|
|
|
+ PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
|
|
jal prepare_ftrace_return
|
|
jal prepare_ftrace_return
|
|
move a2, fp /* arg3: frame pointer */
|
|
move a2, fp /* arg3: frame pointer */
|
|
|
|
|