diff options
| -rw-r--r-- | kernel/trace/ftrace.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 83a16e9ee518..20aff3f1c719 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
| @@ -884,10 +884,8 @@ enum { | |||
| 884 | FTRACE_ENABLE_CALLS = (1 << 0), | 884 | FTRACE_ENABLE_CALLS = (1 << 0), |
| 885 | FTRACE_DISABLE_CALLS = (1 << 1), | 885 | FTRACE_DISABLE_CALLS = (1 << 1), |
| 886 | FTRACE_UPDATE_TRACE_FUNC = (1 << 2), | 886 | FTRACE_UPDATE_TRACE_FUNC = (1 << 2), |
| 887 | FTRACE_ENABLE_MCOUNT = (1 << 3), | 887 | FTRACE_START_FUNC_RET = (1 << 3), |
| 888 | FTRACE_DISABLE_MCOUNT = (1 << 4), | 888 | FTRACE_STOP_FUNC_RET = (1 << 4), |
| 889 | FTRACE_START_FUNC_RET = (1 << 5), | ||
| 890 | FTRACE_STOP_FUNC_RET = (1 << 6), | ||
| 891 | }; | 889 | }; |
| 892 | 890 | ||
| 893 | static int ftrace_filtered; | 891 | static int ftrace_filtered; |
| @@ -1226,8 +1224,6 @@ static void ftrace_shutdown(int command) | |||
| 1226 | 1224 | ||
| 1227 | static void ftrace_startup_sysctl(void) | 1225 | static void ftrace_startup_sysctl(void) |
| 1228 | { | 1226 | { |
| 1229 | int command = FTRACE_ENABLE_MCOUNT; | ||
| 1230 | |||
| 1231 | if (unlikely(ftrace_disabled)) | 1227 | if (unlikely(ftrace_disabled)) |
| 1232 | return; | 1228 | return; |
| 1233 | 1229 | ||
| @@ -1235,23 +1231,17 @@ static void ftrace_startup_sysctl(void) | |||
| 1235 | saved_ftrace_func = NULL; | 1231 | saved_ftrace_func = NULL; |
| 1236 | /* ftrace_start_up is true if we want ftrace running */ | 1232 | /* ftrace_start_up is true if we want ftrace running */ |
| 1237 | if (ftrace_start_up) | 1233 | if (ftrace_start_up) |
| 1238 | command |= FTRACE_ENABLE_CALLS; | 1234 | ftrace_run_update_code(FTRACE_ENABLE_CALLS); |
| 1239 | |||
| 1240 | ftrace_run_update_code(command); | ||
| 1241 | } | 1235 | } |
| 1242 | 1236 | ||
| 1243 | static void ftrace_shutdown_sysctl(void) | 1237 | static void ftrace_shutdown_sysctl(void) |
| 1244 | { | 1238 | { |
| 1245 | int command = FTRACE_DISABLE_MCOUNT; | ||
| 1246 | |||
| 1247 | if (unlikely(ftrace_disabled)) | 1239 | if (unlikely(ftrace_disabled)) |
| 1248 | return; | 1240 | return; |
| 1249 | 1241 | ||
| 1250 | /* ftrace_start_up is true if ftrace is running */ | 1242 | /* ftrace_start_up is true if ftrace is running */ |
| 1251 | if (ftrace_start_up) | 1243 | if (ftrace_start_up) |
| 1252 | command |= FTRACE_DISABLE_CALLS; | 1244 | ftrace_run_update_code(FTRACE_DISABLE_CALLS); |
| 1253 | |||
| 1254 | ftrace_run_update_code(command); | ||
| 1255 | } | 1245 | } |
| 1256 | 1246 | ||
| 1257 | static cycle_t ftrace_update_time; | 1247 | static cycle_t ftrace_update_time; |
