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

Linux 6.18.37 · Tracing

Trace Performance Monitoring and Diagnostics Aggregator (TPDA)

TPDA의 arbitration·packetization·funneling·timestamp 기능과 TPDM integration test에서 sink rwp로 data path를 검증하는 절차를 설명합니다.

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

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

1. 요약·해설

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

요약·해설

coresight-tpda.rst:1-52

TPDA의 arbitration·packetization·funneling·timestamp 기능과 TPDM integration test에서 sink rwp로 data path를 검증하는 절차를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =================================================================
4 The trace performance monitoring and diagnostics aggregator(TPDA)
5 =================================================================
6
7 :Author: Jinlong Mao <[email protected]>
8 :Date: January 2023
9
10 Hardware Description
11 --------------------
12
13 TPDA - The trace performance monitoring and diagnostics aggregator or
14 TPDA in short serves as an arbitration and packetization engine for the
15 performance monitoring and diagnostics network specification.
16 The primary use case of the TPDA is to provide packetization, funneling
17 and timestamping of Monitor data.
18
19
20 Sysfs files and directories
21 ---------------------------
22 Root: ``/sys/bus/coresight/devices/tpda<N>``
23
24 Config details
25 ---------------------------
26
27 The tpdm and tpda nodes should be observed at the coresight path
28 "/sys/bus/coresight/devices".
29 e.g.
30 /sys/bus/coresight/devices # ls -l | grep tpd
31 tpda0 -> ../../../devices/platform/soc@0/6004000.tpda/tpda0
32 tpdm0 -> ../../../devices/platform/soc@0/6c08000.mm.tpdm/tpdm0
33
34 We can use the commands are similar to the below to validate TPDMs.
35 Enable coresight sink first. The port of tpda which is connected to
36 the tpdm will be enabled after commands below.
37
38 echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink
39 echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source
40 echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test
41 echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test
42
43 The test data will be collected in the coresight sink which is enabled.
44 If rwp register of the sink is keeping updating when do
45 integration_test (by cat tmc_etf0/mgmt/rwp), it means there is data
46 generated from TPDM to sink.
47
48 There must be a tpda between tpdm and the sink. When there are some
49 other trace event hw components in the same HW block with tpdm, tpdm
50 and these hw components will connect to the coresight funnel. When
51 there is only tpdm trace hw in the HW block, tpdm will connect to
52 tpda directly.
53

3. 한국어 전문 번역

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

Monitor data 중재·packetization·timestamp

1-23

이 문서는 Jinlong Mao가 2023년 1월에 작성했다. TPDA는 Trace Performance Monitoring and Diagnostics Aggregator의 약자이며 performance monitoring and diagnostics network specification을 위한 arbitration과 packetization engine이다.

TPDA의 주된 용도는 Monitor data를 packetization하고 여러 입력을 funneling하며 timestamp를 붙이는 것이다.

TPDA sysfs root는 `/sys/bus/coresight/devices/tpda<N>`이다.

TPDA data 처리
Monitor data inputsArbitration
ArbitrationPacketization
PacketizationFunneling
FunnelingTimestamped output

여러 Monitor 입력을 중재해 packet과 timestamp가 있는 trace stream으로 만든다.

TPDA 핵심 기능
기능목적
Arbitration여러 monitor input 중재
Packetizationmonitor data를 trace packet으로 구성
Funneling여러 stream 결합
Timestampingdata에 시간 정보 부여

diagnostics network의 aggregator 역할을 구성한다.

.. SPDX-License-Identifier: GPL-2.0

=================================================================
The trace performance monitoring and diagnostics aggregator(TPDA)
=================================================================

    :Author:   Jinlong Mao <[email protected]>
    :Date:     January 2023

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

TPDA - The trace performance monitoring and diagnostics aggregator or
TPDA in short serves as an arbitration and packetization engine for the
performance monitoring and diagnostics network specification.
The primary use case of the TPDA is to provide packetization, funneling
and timestamping of Monitor data.


Sysfs files and directories
---------------------------
Root: ``/sys/bus/coresight/devices/tpda<N>``

TPDM integration test와 sink rwp 확인

24-47

TPDM과 TPDA node는 `/sys/bus/coresight/devices`의 CoreSight path에서 확인할 수 있다. 예제의 `tpda0`과 `tpdm0` symbolic link는 각각 platform device의 TPDA와 TPDM을 가리킨다.

TPDM을 검증할 때는 먼저 CoreSight sink를 enable한다. 이어 TPDM source를 enable하면 해당 TPDM과 연결된 TPDA port도 enable된다.

원문 절차는 `tmc_etf0/enable_sink`에 1을 쓰고 `tpdm0/enable_source`에 1을 쓴 다음, `tpdm0/integration_test`에 1과 2를 차례로 써 test data를 생성한다.

생성된 test data는 enable된 CoreSight sink에 수집된다. integration test 동안 `cat tmc_etf0/mgmt/rwp`로 읽은 sink의 `rwp` register가 계속 갱신되면 TPDM에서 sink까지 data가 생성·전송되고 있다는 뜻이다.

TPDM validation
Enable tmc_etf0 sinkEnable tpdm0 source
integration_test = 1integration_test = 2
TPDM test dataTPDA port
CoreSight sinkrwp keeps updating

sink와 source를 enable하고 integration pattern을 보내 write pointer 변화를 확인한다.

검증 판정
관찰의미
rwp 지속 갱신TPDM에서 sink까지 data 전달 정상
rwp 정지source, TPDA path 또는 sink 설정 점검 필요

명령 결과가 아닌 sink write pointer의 움직임으로 data path를 확인한다.

Config details
---------------------------

The tpdm and tpda nodes should be observed at the coresight path
"/sys/bus/coresight/devices".
e.g.
/sys/bus/coresight/devices # ls -l | grep tpd
tpda0 -> ../../../devices/platform/soc@0/6004000.tpda/tpda0
tpdm0 -> ../../../devices/platform/soc@0/6c08000.mm.tpdm/tpdm0

We can use the commands are similar to the below to validate TPDMs.
Enable coresight sink first. The port of tpda which is connected to
the tpdm will be enabled after commands below.

echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink
echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source
echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test
echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test

The test data will be collected in the coresight sink which is enabled.
If rwp register of the sink is keeping updating when do
integration_test (by cat tmc_etf0/mgmt/rwp), it means there is data
generated from TPDM to sink.

TPDM·funnel·TPDA·sink topology

48-52

TPDM과 sink 사이에는 반드시 TPDA가 있어야 한다.

TPDM과 같은 hardware block에 다른 trace event hardware component가 있으면 TPDM과 그 component들이 먼저 CoreSight funnel에 연결된다. block에 TPDM trace hardware만 있으면 TPDM이 TPDA에 직접 연결된다.

TPDM topology 두 형태
TPDM onlyTPDA
TPDM + other trace componentsCoreSight funnel
CoreSight funnelTPDA
TPDACoreSight sink

hardware block의 다른 trace source 존재 여부에 따라 funnel 경유 여부가 달라진다.

There must be a tpda between tpdm and the sink. When there are some
other trace event hw components in the same HW block with tpdm, tpdm
and these hw components will connect to the coresight funnel. When
there is only tpdm trace hw in the HW block, tpdm will connect to
tpda directly.