I'm debugging the very late stages of kernel reboot (right after ACPI: PM: Preparing to enter system sleep state S5), and I want to see a trace there.
I want to enable ftrace for a rarely called function acpi_sleep_prepare
(so there going to be not much of the noise), but I need to see it on serial console, because everything else is dead by that moment.
Are there a way to force ftrace to log into serial console? If not, what can I do to get trace for that (late shutdown) function?
Why not writing a simple module and using printk ? kmsg could be redirected outward via serial or network.
Since you are trying to trace system reboots, using hardware auxiliaries like JTAG or DCI (for Intel CPUs) would be more effective。