码迷,mamicode.com
首页 > 系统相关 > 详细

ftrace: tracing linux function calls

时间:2018-10-28 16:50:54      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:last   color   bug   roo   lin   can   ted   friend   fun   

First confirm that you have root privilege.

Second check the config of kernel that you have the configs on:

CONFIG_FTRACE=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_EVENT_TRACING=y
CONFIG_FUNCTION_TRACER
CONFIG_STACK_TRACER
CONFIG_DYNAMIC_FTRACE

Last you confirm you have your debugfs/tracefs mounted, by: 

mount -t debugfs nodev /sys/kernel/debug/

Then go into the sys entry tracing and you will find the friendly README.

List some triggers: 

options/funcgraph-irqs, tracing_on, max_graph_depth, set_graph_function, set_ftrace_filter, set_ftrace_pid, current_tracer.

stack_trace can probe runtime kernel address of functions.

ftrace: tracing linux function calls

标签:last   color   bug   roo   lin   can   ted   friend   fun   

原文地址:https://www.cnblogs.com/sansna/p/9866015.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!