use ftrace during boot phase

use ftrace during boot phase

trace_buf_size [KMG]

比如trace_buf_size=1M,这将会把每个cpu的trace buffer设置为1M

trace_event

trace_event=sched:*,timer:*,irq:*

trace_options

用逗号隔开的option list,比如trace_options=stacktrace(trace里的结果将包含stacktrace)

trace option有如下这些:

/sys/kernel/debug/tracing # cat trace_options                          
print-parent
nosym-offset
nosym-addr
noverbose
noraw
nohex
nobin
noblock
trace_printk
annotate
nouserstacktrace
nosym-userobj
noprintk-msg-only
context-info
nolatency-format
record-cmd
norecord-tgid
overwrite
nodisable_on_free
irq-info
markers
noevent-fork
stacktrace
notest_nop_accept
notest_nop_refuse

 

ftrace

比如ftrace=function_graph,tracer设置为function_graph,开机过程中会自动开启tracing,tracing_on的值将为1。如果没有设置ftrace cmdline arg,尽管你有设置trace event,开机过程中不会自动enable trace(tracing_on的值还是0)

reference: https://cloud.tencent.com/developer/article/1797239

 

posted @ 2022-07-23 13:34  aspirs  阅读(93)  评论(0编辑  收藏  举报