how to capture the thread switch events log
echo 1 >/sys/kernel/debug/tracing/events/sched/sched_switch/enable
echo 1 >/sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
echo 1 >/sys/kernel/debug/tracing/tracing_on
reproduce the issue
echo 0 >/sys/kernel/debug/tracing/tracing_on
cat /sys/kernel/debug/tracing/trace
原文:https://www.cnblogs.com/aspirs/p/13687200.html