Skip to content

Ftrace

커널의 내부 동작을 trace 및 디버깅 하기 위해 사용한다.

trace 할 수 있는 건 크게 3가지 종류이다.

  • Event tracing (interrupt, scheduling, filesystem 등)
  • Kernel function tracing (모든 커널 함수, call graph, stack usage)
  • Latency tracing (wakeup, wakeup_rt, irqsoff, preemptoff, preemptirqsoff

특정 파일들을 이용해서 ftrace 관련 설정 및 trace 를 시작할 수 있다. 이 파일들은 보통 /sys/kernel/debug/tracing 폴더에 존재한다.

/sys/kernel/debug/tracing 폴더의 몇몇 주요 파일들을 보면 다음과 같다.

  • available_tracers : 사용 가능한 tracer 들이 적혀 있다.
  • current_tracer : 현재 적용한 tracer 가 적혀 있다.
  • trace : 현재 trace 로그를 확인할 수 있다.
  • README : 각 파일에 대한 설명 및 메뉴얼 확인할 수 있다.

See also

Favorite site