|
@@ -2465,22 +2465,6 @@ ftrace_allocate_pages(unsigned long num_to_init)
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
-static int __init ftrace_dyn_table_alloc(unsigned long num_to_init)
|
|
|
|
-{
|
|
|
|
- int cnt;
|
|
|
|
-
|
|
|
|
- if (!num_to_init) {
|
|
|
|
- pr_info("ftrace: No functions to be traced?\n");
|
|
|
|
- return -1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- cnt = num_to_init / ENTRIES_PER_PAGE;
|
|
|
|
- pr_info("ftrace: allocating %ld entries in %d pages\n",
|
|
|
|
- num_to_init, cnt + 1);
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#define FTRACE_BUFF_MAX (KSYM_SYMBOL_LEN+4) /* room for wildcards */
|
|
#define FTRACE_BUFF_MAX (KSYM_SYMBOL_LEN+4) /* room for wildcards */
|
|
|
|
|
|
struct ftrace_iterator {
|
|
struct ftrace_iterator {
|
|
@@ -4403,10 +4387,13 @@ void __init ftrace_init(void)
|
|
goto failed;
|
|
goto failed;
|
|
|
|
|
|
count = __stop_mcount_loc - __start_mcount_loc;
|
|
count = __stop_mcount_loc - __start_mcount_loc;
|
|
-
|
|
|
|
- ret = ftrace_dyn_table_alloc(count);
|
|
|
|
- if (ret)
|
|
|
|
|
|
+ if (!count) {
|
|
|
|
+ pr_info("ftrace: No functions to be traced?\n");
|
|
goto failed;
|
|
goto failed;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ pr_info("ftrace: allocating %ld entries in %ld pages\n",
|
|
|
|
+ count, count / ENTRIES_PER_PAGE + 1);
|
|
|
|
|
|
last_ftrace_enabled = ftrace_enabled = 1;
|
|
last_ftrace_enabled = ftrace_enabled = 1;
|
|
|
|
|