요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=================================================================
The trace performance monitoring and diagnostics aggregator(TPDA)
=================================================================
:Author: Jinlong Mao <quic_jinlmao@quicinc.com>
: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>``
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.
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.
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>`이다.
여러 Monitor 입력을 중재해 packet과 timestamp가 있는 trace stream으로 만든다.
diagnostics network의 aggregator 역할을 구성한다.
.. SPDX-License-Identifier: GPL-2.0
=================================================================
The trace performance monitoring and diagnostics aggregator(TPDA)
=================================================================
:Author: Jinlong Mao <quic_jinlmao@quicinc.com>
: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-47TPDM과 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가 생성·전송되고 있다는 뜻이다.
sink와 source를 enable하고 integration pattern을 보내 write pointer 변화를 확인한다.
명령 결과가 아닌 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-52TPDM과 sink 사이에는 반드시 TPDA가 있어야 한다.
TPDM과 같은 hardware block에 다른 trace event hardware component가 있으면 TPDM과 그 component들이 먼저 CoreSight funnel에 연결된다. block에 TPDM trace hardware만 있으면 TPDM이 TPDA에 직접 연결된다.
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.
요약·해설
coresight-tpda.rst:1-52TPDA의 arbitration·packetization·funneling·timestamp 기능과 TPDM integration test에서 sink rwp로 data path를 검증하는 절차를 설명합니다.