← Documents Documentation/trace/coresight/coresight-trbe.rst GitHub 원문 ↗

Linux 6.18.37 · Tracing

Trace Buffer Extension (TRBE)

TRBE가 CPU별 ETE trace를 system memory에 기록하는 sink로 통합되는 구조와 align·flag sysfs 정보를 설명합니다.

Source pathDocumentation/trace/coresight/coresight-trbe.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

coresight-trbe.rst:1-38

TRBE가 CPU별 ETE trace를 system memory에 기록하는 sink로 통합되는 구조와 align·flag sysfs 정보를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ==============================
4 Trace Buffer Extension (TRBE).
5 ==============================
6
7 :Author: Anshuman Khandual <anshuman.khandual@arm.com>
8 :Date: November 2020
9
10 Hardware Description
11 --------------------
12
13 Trace Buffer Extension (TRBE) is a percpu hardware which captures in system
14 memory, CPU traces generated from a corresponding percpu tracing unit. This
15 gets plugged in as a coresight sink device because the corresponding trace
16 generators (ETE), are plugged in as source device.
17
18 The TRBE is not compliant to CoreSight architecture specifications, but is
19 driven via the CoreSight driver framework to support the ETE (which is
20 CoreSight compliant) integration.
21
22 Sysfs files and directories
23 ---------------------------
24
25 The TRBE devices appear on the existing coresight bus alongside the other
26 coresight devices::
27
28 >$ ls /sys/bus/coresight/devices
29 trbe0 trbe1 trbe2 trbe3
30
31 The ``trbe<N>`` named TRBEs are associated with a CPU.::
32
33 >$ ls /sys/bus/coresight/devices/trbe0/
34 align flag
35
36 *Key file items are:-*
37 * ``align``: TRBE write pointer alignment
38 * ``flag``: TRBE updates memory with access and dirty flags
39

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

CPU별 ETE trace memory sink

1-21

이 문서는 Anshuman Khandual이 2020년 11월에 작성했다. Trace Buffer Extension(TRBE)은 CPU별 tracing unit이 만든 CPU trace를 system memory에 capture하는 per-CPU hardware다.

대응 trace generator인 ETE가 CoreSight source device로 연결되므로 TRBE는 CoreSight sink device로 연결된다.

TRBE 자체는 CoreSight architecture specification을 준수하지 않지만, CoreSight compliant인 ETE와 통합할 수 있도록 CoreSight driver framework를 통해 구동한다.

ETE와 TRBE
Per-CPU ETE sourceCPU trace stream
CPU trace streamPer-CPU TRBE sink
TRBE sinkSystem memory

CPU별 source에서 생성한 trace를 CPU별 memory sink가 system memory에 기록한다.

Architecture 관계
구성요소CoreSight 준수Framework 역할
ETE준수trace source
TRBE비준수driver framework가 sink로 통합

TRBE의 비표준 hardware를 표준 framework에 통합한다.

.. SPDX-License-Identifier: GPL-2.0

==============================
Trace Buffer Extension (TRBE).
==============================

    :Author:   Anshuman Khandual <anshuman.khandual@arm.com>
    :Date:     November 2020

Hardware Description
--------------------

Trace Buffer Extension (TRBE) is a percpu hardware which captures in system
memory, CPU traces generated from a corresponding percpu tracing unit. This
gets plugged in as a coresight sink device because the corresponding trace
generators (ETE), are plugged in as source device.

The TRBE is not compliant to CoreSight architecture specifications, but is
driven via the CoreSight driver framework to support the ETE (which is
CoreSight compliant) integration.

trbe<N> device와 align·flag

22-38

TRBE device는 다른 CoreSight device와 함께 기존 CoreSight bus에 나타난다. 예제에는 `trbe0`부터 `trbe3`까지 네 device가 있다.

`trbe<N>` 이름의 각 TRBE는 하나의 CPU에 연계된다. `trbe0` directory에는 `align`과 `flag`가 있다.

`align`은 TRBE write pointer alignment를 나타내고, `flag`는 TRBE가 memory를 access flag와 dirty flag로 갱신하는 특성을 나타낸다.

TRBE key file
File의미
alignTRBE write pointer alignment
flagmemory access/dirty flag update

CPU별 buffer의 write alignment와 memory flag 동작을 공개한다.

Per-CPU sysfs mapping
CPU 0trbe0
CPU 1trbe1
CPU Ntrbe<N>

각 CPU의 TRBE가 같은 번호의 CoreSight device로 노출된다.

Sysfs files and directories
---------------------------

The TRBE devices appear on the existing coresight bus alongside the other
coresight devices::

	>$ ls /sys/bus/coresight/devices
	trbe0  trbe1  trbe2 trbe3

The ``trbe<N>`` named TRBEs are associated with a CPU.::

	>$ ls /sys/bus/coresight/devices/trbe0/
        align flag

*Key file items are:-*
   * ``align``: TRBE write pointer alignment
   * ``flag``: TRBE updates memory with access and dirty flags