diff options
-rw-r--r-- | kernel/trace/ftrace.c | 24 | ||||
-rw-r--r-- | kernel/trace/trace_functions.c | 1 |
2 files changed, 13 insertions, 12 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 4e6c87ecf1bf..af9d95c0e4de 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -460,8 +460,8 @@ static void ftrace_bug(int failed, unsigned long ip) | |||
460 | static int | 460 | static int |
461 | __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | 461 | __ftrace_replace_code(struct dyn_ftrace *rec, int enable) |
462 | { | 462 | { |
463 | unsigned long ip, fl; | ||
464 | unsigned long ftrace_addr; | 463 | unsigned long ftrace_addr; |
464 | unsigned long ip, fl; | ||
465 | 465 | ||
466 | ftrace_addr = (unsigned long)FTRACE_ADDR; | 466 | ftrace_addr = (unsigned long)FTRACE_ADDR; |
467 | 467 | ||
@@ -530,9 +530,9 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | |||
530 | 530 | ||
531 | static void ftrace_replace_code(int enable) | 531 | static void ftrace_replace_code(int enable) |
532 | { | 532 | { |
533 | int failed; | ||
534 | struct dyn_ftrace *rec; | 533 | struct dyn_ftrace *rec; |
535 | struct ftrace_page *pg; | 534 | struct ftrace_page *pg; |
535 | int failed; | ||
536 | 536 | ||
537 | do_for_each_ftrace_rec(pg, rec) { | 537 | do_for_each_ftrace_rec(pg, rec) { |
538 | /* | 538 | /* |
@@ -1208,14 +1208,15 @@ ftrace_match_record(struct dyn_ftrace *rec, char *regex, int len, int type) | |||
1208 | 1208 | ||
1209 | static void ftrace_match_records(char *buff, int len, int enable) | 1209 | static void ftrace_match_records(char *buff, int len, int enable) |
1210 | { | 1210 | { |
1211 | char *search; | 1211 | unsigned int search_len; |
1212 | struct ftrace_page *pg; | 1212 | struct ftrace_page *pg; |
1213 | struct dyn_ftrace *rec; | 1213 | struct dyn_ftrace *rec; |
1214 | unsigned long flag; | ||
1215 | char *search; | ||
1214 | int type; | 1216 | int type; |
1215 | unsigned long flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE; | ||
1216 | unsigned search_len; | ||
1217 | int not; | 1217 | int not; |
1218 | 1218 | ||
1219 | flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE; | ||
1219 | type = ftrace_setup_glob(buff, len, &search, ¬); | 1220 | type = ftrace_setup_glob(buff, len, &search, ¬); |
1220 | 1221 | ||
1221 | search_len = strlen(search); | 1222 | search_len = strlen(search); |
@@ -1263,14 +1264,16 @@ ftrace_match_module_record(struct dyn_ftrace *rec, char *mod, | |||
1263 | 1264 | ||
1264 | static void ftrace_match_module_records(char *buff, char *mod, int enable) | 1265 | static void ftrace_match_module_records(char *buff, char *mod, int enable) |
1265 | { | 1266 | { |
1266 | char *search = buff; | 1267 | unsigned search_len = 0; |
1267 | struct ftrace_page *pg; | 1268 | struct ftrace_page *pg; |
1268 | struct dyn_ftrace *rec; | 1269 | struct dyn_ftrace *rec; |
1269 | int type = MATCH_FULL; | 1270 | int type = MATCH_FULL; |
1270 | unsigned long flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE; | 1271 | char *search = buff; |
1271 | unsigned search_len = 0; | 1272 | unsigned long flag; |
1272 | int not = 0; | 1273 | int not = 0; |
1273 | 1274 | ||
1275 | flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE; | ||
1276 | |||
1274 | /* blank or '*' mean the same */ | 1277 | /* blank or '*' mean the same */ |
1275 | if (strcmp(buff, "*") == 0) | 1278 | if (strcmp(buff, "*") == 0) |
1276 | buff[0] = 0; | 1279 | buff[0] = 0; |
@@ -1442,8 +1445,8 @@ register_ftrace_function_hook(char *glob, struct ftrace_hook_ops *ops, | |||
1442 | struct ftrace_func_hook *entry; | 1445 | struct ftrace_func_hook *entry; |
1443 | struct ftrace_page *pg; | 1446 | struct ftrace_page *pg; |
1444 | struct dyn_ftrace *rec; | 1447 | struct dyn_ftrace *rec; |
1445 | unsigned long key; | ||
1446 | int type, len, not; | 1448 | int type, len, not; |
1449 | unsigned long key; | ||
1447 | int count = 0; | 1450 | int count = 0; |
1448 | char *search; | 1451 | char *search; |
1449 | 1452 | ||
@@ -1623,8 +1626,8 @@ int unregister_ftrace_command(struct ftrace_func_command *cmd) | |||
1623 | 1626 | ||
1624 | static int ftrace_process_regex(char *buff, int len, int enable) | 1627 | static int ftrace_process_regex(char *buff, int len, int enable) |
1625 | { | 1628 | { |
1626 | struct ftrace_func_command *p; | ||
1627 | char *func, *command, *next = buff; | 1629 | char *func, *command, *next = buff; |
1630 | struct ftrace_func_command *p; | ||
1628 | int ret = -EINVAL; | 1631 | int ret = -EINVAL; |
1629 | 1632 | ||
1630 | func = strsep(&next, ":"); | 1633 | func = strsep(&next, ":"); |
@@ -2392,7 +2395,6 @@ static __init int ftrace_init_debugfs(void) | |||
2392 | "'set_ftrace_pid' entry\n"); | 2395 | "'set_ftrace_pid' entry\n"); |
2393 | return 0; | 2396 | return 0; |
2394 | } | 2397 | } |
2395 | |||
2396 | fs_initcall(ftrace_init_debugfs); | 2398 | fs_initcall(ftrace_init_debugfs); |
2397 | 2399 | ||
2398 | /** | 2400 | /** |
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index f520aa419dff..021a574c5988 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -397,6 +397,5 @@ static __init int init_function_trace(void) | |||
397 | init_func_cmd_traceon(); | 397 | init_func_cmd_traceon(); |
398 | return register_tracer(&function_trace); | 398 | return register_tracer(&function_trace); |
399 | } | 399 | } |
400 | |||
401 | device_initcall(init_function_trace); | 400 | device_initcall(init_function_trace); |
402 | 401 | ||