diff options
author | Colin Cross <ccross@android.com> | 2012-07-18 14:15:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-07-31 05:30:42 -0400 |
commit | 4c36595ec87115f2f876f7d4fdec8ca284a42b9c (patch) | |
tree | c2700142f13685ab8d5671284344044bc38e2ebc /arch/arm/kernel | |
parent | a76d7bd96d65fa5119adba97e1b58d95f2e78829 (diff) |
ARM: 7468/1: ftrace: Trace function entry before updating index
Commit 722b3c74695377d11d18a52f3da08114d37f3f37 modified x86 ftrace to
avoid tracing all functions called from irqs when function graph was
used with a filter. Port the same fix to ARM.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/ftrace.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c index df0bf0c8cb79..34e56647dcee 100644 --- a/arch/arm/kernel/ftrace.c +++ b/arch/arm/kernel/ftrace.c | |||
@@ -179,19 +179,20 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr, | |||
179 | old = *parent; | 179 | old = *parent; |
180 | *parent = return_hooker; | 180 | *parent = return_hooker; |
181 | 181 | ||
182 | err = ftrace_push_return_trace(old, self_addr, &trace.depth, | ||
183 | frame_pointer); | ||
184 | if (err == -EBUSY) { | ||
185 | *parent = old; | ||
186 | return; | ||
187 | } | ||
188 | |||
189 | trace.func = self_addr; | 182 | trace.func = self_addr; |
183 | trace.depth = current->curr_ret_stack + 1; | ||
190 | 184 | ||
191 | /* Only trace if the calling function expects to */ | 185 | /* Only trace if the calling function expects to */ |
192 | if (!ftrace_graph_entry(&trace)) { | 186 | if (!ftrace_graph_entry(&trace)) { |
193 | current->curr_ret_stack--; | ||
194 | *parent = old; | 187 | *parent = old; |
188 | return; | ||
189 | } | ||
190 | |||
191 | err = ftrace_push_return_trace(old, self_addr, &trace.depth, | ||
192 | frame_pointer); | ||
193 | if (err == -EBUSY) { | ||
194 | *parent = old; | ||
195 | return; | ||
195 | } | 196 | } |
196 | } | 197 | } |
197 | 198 | ||