diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-04-25 14:32:42 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-04-29 22:53:04 -0400 |
commit | d2c8c3eafbf715306ec891e7ca52d3d999acbe31 (patch) | |
tree | 1dd5b7ae74f1dd951b542df3eb455af445a349c1 | |
parent | 45a4a2372b364107cabea79f255b333236626416 (diff) |
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>
-rw-r--r-- | include/linux/ftrace.h | 1 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 2a195ffd4269..32047449b309 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -150,7 +150,6 @@ enum { | |||
150 | FTRACE_FL_FILTER = (1 << 1), | 150 | FTRACE_FL_FILTER = (1 << 1), |
151 | FTRACE_FL_ENABLED = (1 << 2), | 151 | FTRACE_FL_ENABLED = (1 << 2), |
152 | FTRACE_FL_NOTRACE = (1 << 3), | 152 | FTRACE_FL_NOTRACE = (1 << 3), |
153 | FTRACE_FL_CONVERTED = (1 << 4), | ||
154 | }; | 153 | }; |
155 | 154 | ||
156 | struct dyn_ftrace { | 155 | struct dyn_ftrace { |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index eb19fae2c54a..9abaaf46f212 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1087,12 +1087,8 @@ static void ftrace_replace_code(int enable) | |||
1087 | return; | 1087 | return; |
1088 | 1088 | ||
1089 | do_for_each_ftrace_rec(pg, rec) { | 1089 | do_for_each_ftrace_rec(pg, rec) { |
1090 | /* | 1090 | /* Skip over free records */ |
1091 | * Skip over free records, records that have | 1091 | if (rec->flags & FTRACE_FL_FREE) |
1092 | * failed and not converted. | ||
1093 | */ | ||
1094 | if (rec->flags & FTRACE_FL_FREE || | ||
1095 | !(rec->flags & FTRACE_FL_CONVERTED)) | ||
1096 | continue; | 1092 | continue; |
1097 | 1093 | ||
1098 | failed = __ftrace_replace_code(rec, enable); | 1094 | failed = __ftrace_replace_code(rec, enable); |
@@ -1280,10 +1276,10 @@ static int ftrace_update_code(struct module *mod) | |||
1280 | */ | 1276 | */ |
1281 | if (!ftrace_code_disable(mod, p)) { | 1277 | if (!ftrace_code_disable(mod, p)) { |
1282 | ftrace_free_rec(p); | 1278 | ftrace_free_rec(p); |
1283 | continue; | 1279 | /* Game over */ |
1280 | break; | ||
1284 | } | 1281 | } |
1285 | 1282 | ||
1286 | p->flags |= FTRACE_FL_CONVERTED; | ||
1287 | ftrace_update_cnt++; | 1283 | ftrace_update_cnt++; |
1288 | 1284 | ||
1289 | /* | 1285 | /* |