1) 打开调度相关的的event:其他event一次类推

[[email protected] ~]# echo 1 > /sys/kernel/debug/tracing/events/sched/enable
[[email protected] ~]# cat /sys/kernel/debug/tracing/trace
trace             trace_clock       trace_marker      trace_marker_raw  trace_options     trace_pipe
[[email protected] ~]# cat /sys/kernel/debug/tracing/trace
trace             trace_clock       trace_marker      trace_marker_raw  trace_options     trace_pipe
[[email protected] ~]# cat /sys/kernel/debug/tracing/trace_pipe > trace.dat

同时在其他窗口运行程序,按ctrl+c 结束cat
^C
2)查看

chome 浏览器地址栏中输入chrome://tracing/,将trace.dat 拖到chrome浏览器中查看。生成的图如下:

 

 

 

通过trace生成系统cpu的loading图

 

相关文章:

  • 2021-05-17
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-05-12
  • 2021-08-16
  • 2021-06-30
  • 2022-02-04
猜你喜欢
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-11-12
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案