2013-06-02 153 views
1

我正在浏览Linux KERNEL配置文件,其中function_trace已启用,但debugfs已禁用。如果我把这个内核加载到目标上有什么办法,我可以使用function_tracer?如果debugfs被禁用,那么函数跟踪器默认情况下未启用?是否可以在不使用debugfs的情况下使用ftrace?

回答

1

从技术上说,不启用debugfs就不能选择function_trace。根据跟踪配置文件(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/Kconfig#n140),它表明 - 如果选择FUNCTION_TRACER,它将自动选择GENERIC_TRACER,当选择GENERIC_TRACER时,它将自动选择TRACING(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/Kconfig#n112),当选择TRACING时,它将选择DEBUG_FS(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/Kconfig#n101) 。

所以,这是一个选择程序的链表,你不需要每次都选择每个选项。除非你手动修改了配置文件,并且不推荐。

相关问题