我正在开发一个嵌入式 Linux (kernel-5.10.24) 系统,其中启用了 ftrace 但没有perf
。
我检查了系统中的跟踪,并得到以下信息,
# ls /sys/kernel/tracing/events/sched/ -l
total 0
-rw-r--r-- 1 root root 0 Jan 1 1970 enable
-rw-r--r-- 1 root root 0 Jan 1 1970 filter
drwxr-x--- 2 root root 0 Jan 1 1970 sched_kthread_stop
drwxr-x--- 2 root root 0 Jan 1 1970 sched_kthread_stop_ret
drwxr-x--- 2 root root 0 Jan 1 1970 sched_migrate_task
drwxr-x--- 2 root root 0 Jan 1 1970 sched_move_numa
drwxr-x--- 2 root root 0 Jan 1 1970 sched_pi_setprio
drwxr-x--- 2 root root 0 Jan 1 1970 sched_process_exec
drwxr-x--- 2 root root 0 Jan 1 1970 sched_process_exit
drwxr-x--- 2 root root 0 Jan 1 1970 sched_process_fork
drwxr-x--- 2 root root 0 Jan 1 1970 sched_process_free
drwxr-x--- 2 root root 0 Jan 1 1970 sched_process_hang
drwxr-x--- 2 root root 0 Jan 1 1970 sched_process_wait
drwxr-x--- 2 root root 0 Jan 1 1970 sched_stat_blocked
drwxr-x--- 2 root root 0 Jan 1 1970 sched_stat_iowait
drwxr-x--- 2 root root 0 Jan 1 1970 sched_stat_runtime
drwxr-x--- 2 root root 0 Jan 1 1970 sched_stat_sleep
drwxr-x--- 2 root root 0 Jan 1 1970 sched_stat_wait
drwxr-x--- 2 root root 0 Jan 1 1970 sched_stick_numa
drwxr-x--- 2 root root 0 Jan 1 1970 sched_swap_numa
drwxr-x--- 2 root root 0 Jan 1 1970 sched_switch
drwxr-x--- 2 root root 0 Jan 1 1970 sched_wait_task
drwxr-x--- 2 root root 0 Jan 1 1970 sched_wake_idle_without_ipi
drwxr-x--- 2 root root 0 Jan 1 1970 sched_wakeup
drwxr-x--- 2 root root 0 Jan 1 1970 sched_wakeup_new
drwxr-x--- 2 root root 0 Jan 1 1970 sched_waking
所以,我想知道是否可以直接获取调度延迟ftrace
而不使用perf sched
?如果是这样,可以使用哪些事件和数据来测量延迟?