728x90
반응형
12 DDR Performance Monitor
12.1 Introduction
일부 i.MX 8 DDR 컨트롤러에는 DDR 신호를 모니터링하는 데 사용되는 카운터가 있다. 일부 신호는 사용자가 DDR 트랜잭션을 모니터링하고 DDR 대역폭을 계산하는 데 도움이 될 수 있다.
12.2 Frequently used events
다음 이벤트는 서로 다른 플랫폼에서 DDR 트랜잭션을 모니터링하는 데 자주 사용된다.
- i.MX 8QuadMax/8QuadXPlus/8M Quad/8M Mini/8M Nano: cycles, read-cycles, write-cycles
- i.MX 8M Plus: axid-read, axid-write
- i.MX 8DXL: cycles, read-cycles, write-cycles, axid-read, axid-write
참고:
- i.MX 8M Plus와 8DXL은 AXI ID 필터링을 지원한다.
- i.MX 8M Plus의 경우, 카운터 오버플로우로 이어지는 하드웨어 버그가 있기 때문에 cycles, read-cycles, write-cycles를 사용할 수 없다.
12.3 Showing supported events
지원되는 이벤트를 표기하려면 다음 커맨드를 실행한다:
# perf list pmu | grep imx8_ddr
imx8_ddr0/activate/ [Kernel PMU event]
imx8_ddr0/axid-read/ [Kernel PMU event]
imx8_ddr0/axid-write/ [Kernel PMU event]
imx8_ddr0/cycles/ [Kernel PMU event]
imx8_ddr0/hp-read-credit-cnt/ [Kernel PMU event]
imx8_ddr0/hp-read/ [Kernel PMU event]
imx8_ddr0/hp-req-nocredit/ [Kernel PMU event]
imx8_ddr0/hp-xact-credit/ [Kernel PMU event]
imx8_ddr0/load-mode/ [Kernel PMU event]
imx8_ddr0/lp-read-credit-cnt/ [Kernel PMU event]
imx8_ddr0/lp-req-nocredit/ [Kernel PMU event]
imx8_ddr0/lp-xact-credit/ [Kernel PMU event]
imx8_ddr0/perf-mwr/ [Kernel PMU event]
imx8_ddr0/precharge/ [Kernel PMU event]
imx8_ddr0/raw-hazard/ [Kernel PMU event]
imx8_ddr0/read-accesses/ [Kernel PMU event]
imx8_ddr0/read-activate/ [Kernel PMU event]
imx8_ddr0/read-command/ [Kernel PMU event]
imx8_ddr0/read-cycles/ [Kernel PMU event]
imx8_ddr0/read-modify-write-command/ [Kernel PMU event]
imx8_ddr0/read-queue-depth/ [Kernel PMU event]
imx8_ddr0/read-write-transition/ [Kernel PMU event]
imx8_ddr0/read/ [Kernel PMU event]
imx8_ddr0/refresh/ [Kernel PMU event]
imx8_ddr0/selfresh/ [Kernel PMU event]
imx8_ddr0/wr-xact-credit/ [Kernel PMU event]
imx8_ddr0/write-accesses/ [Kernel PMU event]
imx8_ddr0/write-command/ [Kernel PMU event]
imx8_ddr0/write-credit-cnt/ [Kernel PMU event]
imx8_ddr0/write-cycles/ [Kernel PMU event]
imx8_ddr0/write-queue-depth/ [Kernel PMU event]
imx8_ddr0/write/ [Kernel PMU event]
12.4 Examples for monitoring transactions
이 섹션에서는 DDR 트랜잭션을 모니터링하는 몇 가지 예를 보여준다.
- i.MX 8QuadMax/8QuadXPlus/8M Quad/8M Mini/8M Nano의 경우:
# perf stat -a -I 1000 -e imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/
- i.MX 8M Plus의 경우:
- All masters:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_mask=0xffff/,imx8_ddr0/axid-write,axi_mask=0xffff/
- GPU 3D:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_id=0x70/,imx8_ddr0/axid-write,axi_id=0x70/
- LCDIF1:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_id=0x68/,imx8_ddr0/axid-write,axi_id=0x68/
- All masters:
- i.MX 8DXL의 경우:
- All masters:
# perf stat -a -I 1000 -e imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ # perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_mask=0xffff/,imx8_ddr0/axid-write,axi_mask=0xffff/
- USB 2.0:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_mask=0xb0,axi_id=0x40b/,imx8_ddr0/axid-write,axi_mask=0xb0,axi_id=0x40b/
- USDHC0:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_id=0x1b/,imx8_ddr0/axid-write,axi_id=0x1b/
- All masters:
12.5 Performance metric
이벤트 커맨드 라인이 너무 번거롭다면 이벤트 대신 메트릭을 사용할 수 있다. 다음은 i.MX 8QuadXPlus의 예이다.
12.5.1 Showing supported metric
다음 커맨드를 실행하여 지원되는 측정항목을 표시한다:
# perf list metric
List of pre-defined events (to be used in -e):
Metrics:
imx8qxp_bandwidth_usage.lpddr4
[bandwidth usage for lpddr4 mek board. Unit: imx8_ddr ]
imx8qxp_ddr_read.all
[bytes all masters read from ddr based on read-cycles event. Unit: imx8_ddr ]
imx8qxp_ddr_write.all
[bytes all masters wirte to ddr based on write-cycles event. Unit: imx8_ddr ]
12.5.2 Monitoring transactions
다음 커맨드를 실행하여 트랜잭션을 모니터링한다:
# perf stat -a -I 1000 -M
imx8qxp_ddr_read.all,imx8qxp_ddr_write.all
# time counts unit events
1.001115250 28264 imx8_ddr0/read-cycles/ # 441.6 KB
imx8qxp_ddr_read.all
1.001115250 11622 imx8_ddr0/write-cycles/ # 181.6 KB
imx8qxp_ddr_write.all
2.002718000 14496 imx8_ddr0/read-cycles/ # 226.5 KB
imx8qxp_ddr_read.all
2.002718000 4585 imx8_ddr0/write-cycles/ # 71.6 KB
imx8qxp_ddr_write.all
12.6 DDR Performance usage summary
DDR 트랜잭션을 모니터링하기 위해 메트릭을 사용하는 것이 더 편리하므로 권장되고 있다. 추가 계산 없이 직접 모든 마스터나 특정 마스터의 DDR 대역폭을 얻을 수 있다. 특히 AXI ID 필터링을 지원하는 플랫폼에서는 검색 마스터의 ID를 제거해야 한다.
728x90
반응형
'NXP i.MX SoC Family > i.MX Linux User`s Guide (IMXLUG)' 카테고리의 다른 글
i.MX Linux User's Guide (IMXLUG) - NXP eIQ Machine Learning (0) | 2023.04.03 |
---|---|
i.MX Linux User's Guide (IMXLUG) - One-Time Programmable Controller Driver Using NVMEM Subsystem (0) | 2023.03.31 |
i.MX Linux User's Guide (IMXLUG) - Connectivity (0) | 2023.03.28 |
i.MX Linux User's Guide (IMXLUG) - Security (0) | 2023.03.13 |
i.MX Linux User's Guide (IMXLUG) - Graphics (0) | 2023.03.10 |