本文介绍了如何启用或配置ftrace模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ftrace的高级功能,但我不知道怎么做。 debugfs已安装,但/ sys / kernel / debug中没有跟踪文件夹。
i正在通过yocto运行ARM-Target @ Angstrom发行版,请参阅:







如何配置内核?我必须设置哪些选项?

解决方案

在yocto项目conf / local.conf文件&中添加以下内核配置选项。然后清洗&

  KERNEL_CONFIG_DYNAMIC_FTRACE = y 
KERNEL_CONFIG_DEBUG_FS = y
KERNEL_CONFIG_FTRACE = y
KERNEL_CONFIG_FUNCTION_TRACER = y
KERNEL_CONFIG_FUNCTION_GRAPH_TRACER = y
KERNEL_CONFIG_IRQSOFF_TRACER = y
KERNEL_CONFIG_PREEMPT_TRACER = y
KERNEL_CONFIG_ KERNEL_CONFIG_STACK_TRACER = y
KERNEL_CONFIG_BLK_DEV_IO_TRACE = y
KERNEL_CONFIG_FUNCTION_PROFILER = y
KERNEL_CONFIG_FTRACE_MCOUNT_RECORD = y

使用此内核引导应启用ftrace


i'd like to use the advanced features of ftrace but i dit not figure out how. debugfs is mounted but there is no "tracing"-folder in /sys/kernel/debug. i am running a ARM-Target @ Angstrom distro build via yocto, please see :

Image: uname -a & lsb_release -a output

zcat /proc/config.gz | grep TRACER|FTRACE output

How to configure the kernel ? which options i have to set?

解决方案

Add below kernel config options in your yocto project conf/local.conf file & then clean & rebuild linux kernel.

KERNEL_CONFIG_DYNAMIC_FTRACE="y"
KERNEL_CONFIG_DEBUG_FS="y"
KERNEL_CONFIG_FTRACE="y"
KERNEL_CONFIG_FUNCTION_TRACER="y"
KERNEL_CONFIG_FUNCTION_GRAPH_TRACER="y"
KERNEL_CONFIG_IRQSOFF_TRACER="y"
KERNEL_CONFIG_PREEMPT_TRACER="y"
KERNEL_CONFIG_SCHED_TRACER="y"
KERNEL_CONFIG_STACK_TRACER="y"
KERNEL_CONFIG_BLK_DEV_IO_TRACE="y"
KERNEL_CONFIG_FUNCTION_PROFILER="y"
KERNEL_CONFIG_FTRACE_MCOUNT_RECORD="y"

Booting with this kernel shall have ftrace enabled

这篇关于如何启用或配置ftrace模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 08:36