728x90
반응형
initcall_debug ftrace=initcall
mount -t debugfs nodev /sys/kernel/debug
Add follow options in bootargs `initcall_debug ftrace=initcall`
tracing mini-HOWTO:
# mount -t debugfs nodev /sys/kernel/debug
# cat /sys/kernel/debug/tracing/available_tracers
wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop
wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop
# cat /sys/kernel/debug/tracing/current_tracer
nop
# echo sched_switch > /sys/kernel/debug/tracing/current_tracer
# cat /sys/kernel/debug/tracing/current_tracer
sched_switch
# cat /sys/kernel/debug/tracing/trace_options
noprint-parent nosym-offset nosym-addr noverbose
# echo print-parent > /sys/kernel/debug/tracing/trace_options
# echo 1 > /sys/kernel/debug/tracing/tracing_enabled
# cat /sys/kernel/debug/tracing/trace > trace.txt
# echo 0 > /sys/kernel/debug/tracing/tracing_enabled
nop
# echo sched_switch > /sys/kernel/debug/tracing/current_tracer
# cat /sys/kernel/debug/tracing/current_tracer
sched_switch
# cat /sys/kernel/debug/tracing/trace_options
noprint-parent nosym-offset nosym-addr noverbose
# echo print-parent > /sys/kernel/debug/tracing/trace_options
# echo 1 > /sys/kernel/debug/tracing/tracing_enabled
# cat /sys/kernel/debug/tracing/trace > trace.txt
# echo 0 > /sys/kernel/debug/tracing/tracing_enabled
echo trace.txt | perl <KERNEL_DIR>/scripts/bootgraph.pl > initcall.svg
728x90
반응형
댓글