[RFC][PATCH 2/4] ftrace: Move ftrace_init() to right after memory initialization

From: Steven Rostedt
Date: Tue Mar 07 2017 - 19:02:25 EST


From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

Initialize the ftrace records immediately after memory initialization, as
that is all that is required for the records to be created. This will allow
for future work to get function tracing started earlier in the boot process.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
init/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index 0d6cc6661f2b..552a2c9ec6d9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -539,6 +539,8 @@ asmlinkage __visible void __init start_kernel(void)
trap_init();
mm_init();

+ ftrace_init();
+
/* trace_printk can be enabled here */
early_trace_init();

@@ -670,8 +672,6 @@ asmlinkage __visible void __init start_kernel(void)
efi_free_boot_services();
}

- ftrace_init();
-
/* Do the rest non-__init'ed, we're now alive */
rest_init();
}
--
2.10.2