요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
===============================
The Linux Kernel Tracepoint API
===============================
:Author: Jason Baron
:Author: William Cohen
Introduction
============
Tracepoints are static probe points that are located in strategic points
throughout the kernel. 'Probes' register/unregister with tracepoints via
a callback mechanism. The 'probes' are strictly typed functions that are
passed a unique set of parameters defined by each tracepoint.
From this simple callback mechanism, 'probes' can be used to profile,
debug, and understand kernel behavior. There are a number of tools that
provide a framework for using 'probes'. These tools include Systemtap,
ftrace, and LTTng.
Tracepoints are defined in a number of header files via various macros.
Thus, the purpose of this document is to provide a clear accounting of
the available tracepoints. The intention is to understand not only what
tracepoints are available but also to understand where future
tracepoints might be added.
The API presented has functions of the form:
``trace_tracepointname(function parameters)``. These are the tracepoints
callbacks that are found throughout the code. Registering and
unregistering probes with these callback sites is covered in the
``Documentation/trace/*`` directory.
IRQ
===
.. kernel-doc:: include/trace/events/irq.h
:internal:
SIGNAL
======
.. kernel-doc:: include/trace/events/signal.h
:internal:
Block IO
========
.. kernel-doc:: include/trace/events/block.h
:internal:
Workqueue
=========
.. kernel-doc:: include/trace/events/workqueue.h
:internal:
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Linux Kernel Tracepoint API
1-7Linux Kernel Tracepoint API
저자: Jason Baron
저자: William Cohen
소개
8-32소개
Tracepoint는 kernel 전체의 전략적인 지점에 배치된 static probe point입니다. `Probe`는 callback mechanism을 통해 tracepoint에 등록하거나 등록 해제합니다. 각 probe는 tracepoint마다 정의된 고유한 parameter 집합을 전달받는 엄격하게 type이 지정된 function입니다.
이 단순한 callback mechanism을 바탕으로 probe를 사용해 kernel behavior를 profiling하고 debugging하며 이해할 수 있습니다. Probe 사용 framework를 제공하는 tool에는 Systemtap, ftrace 및 LTTng이 있습니다.
Tracepoint는 여러 header file에서 다양한 macro로 정의됩니다. 따라서 이 문서의 목적은 사용할 수 있는 tracepoint를 명확하게 열거하는 것입니다. 현재 어떤 tracepoint를 사용할 수 있는지뿐 아니라 앞으로 tracepoint를 어디에 추가할 수 있는지도 이해하려는 것입니다.
제시된 API의 function 형식은 `trace_tracepointname(function parameters)`입니다. 이는 code 전반에 있는 tracepoint callback입니다. 이 callback site에 probe를 등록하고 등록 해제하는 방법은 `Documentation/trace/*` directory에서 다룹니다.
IRQ
33-38IRQ
IRQ trace event의 내부 kernel-doc를 포함합니다.
.. kernel-doc:: include/trace/events/irq.h
:internal:
SIGNAL
39-44SIGNAL
Signal trace event의 내부 kernel-doc를 포함합니다.
.. kernel-doc:: include/trace/events/signal.h
:internal:
Block IO
45-50Block IO
Block IO trace event의 내부 kernel-doc를 포함합니다.
.. kernel-doc:: include/trace/events/block.h
:internal:
Workqueue
51-55Workqueue
Workqueue trace event의 내부 kernel-doc를 포함합니다.
.. kernel-doc:: include/trace/events/workqueue.h
:internal:
요약과 해설
tracepoint.rst:1-55Tracepoint는 kernel source의 미리 정한 위치에 존재하는 static instrumentation point입니다. 엄격하게 type이 지정된 probe callback을 등록해 실행 흐름과 event parameter를 관찰합니다.
Systemtap, ftrace, LTTng 같은 tracing tool이 이 callback mechanism 위에서 profiling과 debugging 기능을 제공합니다. 실제 probe 등록 및 해제 절차는 `Documentation/trace/*`에 있습니다.
이 문서는 `include/trace/events/irq.h`, `signal.h`, `block.h`, `workqueue.h`의 내부 kernel-doc를 연결해 현재 제공되는 tracepoint를 API reference에 포함합니다.