tracing/ftrace: fix the check on nopped sites
Steven Rostedt
Acked-byQuoted 23 lines · Frederic Weisbecker
Impact: fix a dynamic tracing failure
Recently, the function and function graph tracers failed to use dynamic tracing after the following commit:
fa9d13cf135efbd454453a53b6299976bea245a9
(ftrace: don't try to__ftrace_replace_codeon !FTRACE_FL_CONVERTED rec)The patch is right except a mistake on the check for the
FTRACE_FL_CONVERTEDflag. 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 <[email protected]>--- kernel/trace/ftrace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/trace/ftrace.c +0
-0
kernel/trace/ftrace.c static void ftrace_replace_code(int enable) · line 543
Quoted 8 lines
kernel/trace/ftrace.c +1
-1@@ -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 */
Heh, I just found this bug too, and wrote a patch. But you posted before I did, so I'll let you have it ;-)
-- Steve
Ingo,
I pulled this into my repo, and will post it shortly.
-- Steve
Quoted 34 lines · Frederic Weisbecker
Impact: fix a dynamic tracing failure
Recently, the function and function graph tracers failed to use dynamic tracing after the following commit:
fa9d13cf135efbd454453a53b6299976bea245a9
(ftrace: don't try to__ftrace_replace_codeon !FTRACE_FL_CONVERTED rec)The patch is right except a mistake on the check for the
FTRACE_FL_CONVERTEDflag. 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 <[email protected]>--- kernel/trace/ftrace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/trace/ftrace.c +1
-1@@ -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 */ Signature · 1 line
1.6.1
* From: "Steven Rostedt" <[email protected]>
Quoted 33 lines · Frederic Weisbecker
Quoted 30 lines
Impact: fix a dynamic tracing failure
Recently, the function and function graph tracers failed to use dynamic tracing after the following commit:
fa9d13cf135efbd454453a53b6299976bea245a9
(ftrace: don't try to__ftrace_replace_codeon !FTRACE_FL_CONVERTED rec)The patch is right except a mistake on the check for the
FTRACE_FL_CONVERTEDflag. 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 <[email protected]>--- kernel/trace/ftrace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/trace/ftrace.c +1
-1@@ -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 ;
Quoted 2 lines
kernel/trace/ftrace.c static void ftrace_replace_code(int enable) · line 543
Quoted 2 lines
kernel/trace/ftrace.c +0
-0/* ignore updates to this record's mcount site */
Hello,
Sorry for my fault.
B.R.
Zhaolei
Quoted 10 lines
Heh, I just found this bug too, and wrote a patch. But you posted before I did, so I'll let you have it ;-)
Acked-by Steven Rostedt <[email protected]>-- Steve
ÿôèº{.nÇ+‰·Ÿ®‰†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºÊ‡Ú™ë,j¢f£¢·hš�ï�êÿ‘êçz_è®(階ŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨èÚ&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿÃÿ¶ìÿ¢¸?–I¥