ftrace: Remove FTRACE_FL_CONVERTED flag
Since we disable all function tracer processing if we detect that a modification of a instruction had failed, we do not need to track that the record has failed. No more ftrace processing is allowed, and the FTRACE_FL_CONVERTED flag is pointless. The FTRACE_FL_CONVERTED flag was used to denote records that were successfully converted from mcount calls into nops. But if a single record fails, all of ftrace is disabled. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
45a4a2372b
commit
d2c8c3eafb
2 changed files with 4 additions and 9 deletions
|
@ -150,7 +150,6 @@ enum {
|
||||||
FTRACE_FL_FILTER = (1 << 1),
|
FTRACE_FL_FILTER = (1 << 1),
|
||||||
FTRACE_FL_ENABLED = (1 << 2),
|
FTRACE_FL_ENABLED = (1 << 2),
|
||||||
FTRACE_FL_NOTRACE = (1 << 3),
|
FTRACE_FL_NOTRACE = (1 << 3),
|
||||||
FTRACE_FL_CONVERTED = (1 << 4),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dyn_ftrace {
|
struct dyn_ftrace {
|
||||||
|
|
|
@ -1087,12 +1087,8 @@ static void ftrace_replace_code(int enable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
do_for_each_ftrace_rec(pg, rec) {
|
do_for_each_ftrace_rec(pg, rec) {
|
||||||
/*
|
/* Skip over free records */
|
||||||
* Skip over free records, records that have
|
if (rec->flags & FTRACE_FL_FREE)
|
||||||
* failed and not converted.
|
|
||||||
*/
|
|
||||||
if (rec->flags & FTRACE_FL_FREE ||
|
|
||||||
!(rec->flags & FTRACE_FL_CONVERTED))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
failed = __ftrace_replace_code(rec, enable);
|
failed = __ftrace_replace_code(rec, enable);
|
||||||
|
@ -1280,10 +1276,10 @@ static int ftrace_update_code(struct module *mod)
|
||||||
*/
|
*/
|
||||||
if (!ftrace_code_disable(mod, p)) {
|
if (!ftrace_code_disable(mod, p)) {
|
||||||
ftrace_free_rec(p);
|
ftrace_free_rec(p);
|
||||||
continue;
|
/* Game over */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->flags |= FTRACE_FL_CONVERTED;
|
|
||||||
ftrace_update_cnt++;
|
ftrace_update_cnt++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue