Skip to content

Commit

Permalink
tracing/ftrace: fix the check on nopped sites
Browse files Browse the repository at this point in the history
Impact: fix a dynamic tracing failure

Recently, the function and function graph tracers failed to use dynamic
tracing after the following commit:

fa9d13c
(ftrace: don't try to __ftrace_replace_code on !FTRACE_FL_CONVERTED rec)

The patch is right except a mistake on the check for the FTRACE_FL_CONVERTED
flag. The code patching is aborted in case of successfully nopped sites.
What we want is the opposite: ignore the callsites that haven't been nopped.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
  • Loading branch information
Frederic Weisbecker authored and Steven Rostedt committed Mar 17, 2009
1 parent b478b78 commit 0330354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ static void ftrace_replace_code(int enable)
*/
if (rec->flags & FTRACE_FL_FREE ||
rec->flags & FTRACE_FL_FAILED ||
rec->flags & FTRACE_FL_CONVERTED)
!(rec->flags & FTRACE_FL_CONVERTED))
continue;

/* ignore updates to this record's mcount site */
Expand Down

0 comments on commit 0330354

Please sign in to comment.