meson-ddr-pmu.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===========================================================
  3. Amlogic SoC DDR Bandwidth Performance Monitoring Unit (PMU)
  4. ===========================================================
  5. The Amlogic Meson G12 SoC contains a bandwidth monitor inside DRAM controller.
  6. The monitor includes 4 channels. Each channel can count the request accessing
  7. DRAM. The channel can count up to 3 AXI port simultaneously. It can be helpful
  8. to show if the performance bottleneck is on DDR bandwidth.
  9. Currently, this driver supports the following 5 perf events:
  10. + meson_ddr_bw/total_rw_bytes/
  11. + meson_ddr_bw/chan_1_rw_bytes/
  12. + meson_ddr_bw/chan_2_rw_bytes/
  13. + meson_ddr_bw/chan_3_rw_bytes/
  14. + meson_ddr_bw/chan_4_rw_bytes/
  15. meson_ddr_bw/chan_{1,2,3,4}_rw_bytes/ events are channel-specific events.
  16. Each channel support filtering, which can let the channel to monitor
  17. individual IP module in SoC.
  18. Below are DDR access request event filter keywords:
  19. + arm - from CPU
  20. + vpu_read1 - from OSD + VPP read
  21. + gpu - from 3D GPU
  22. + pcie - from PCIe controller
  23. + hdcp - from HDCP controller
  24. + hevc_front - from HEVC codec front end
  25. + usb3_0 - from USB3.0 controller
  26. + hevc_back - from HEVC codec back end
  27. + h265enc - from HEVC encoder
  28. + vpu_read2 - from DI read
  29. + vpu_write1 - from VDIN write
  30. + vpu_write2 - from di write
  31. + vdec - from legacy codec video decoder
  32. + hcodec - from H264 encoder
  33. + ge2d - from ge2d
  34. + spicc1 - from SPI controller 1
  35. + usb0 - from USB2.0 controller 0
  36. + dma - from system DMA controller 1
  37. + arb0 - from arb0
  38. + sd_emmc_b - from SD eMMC b controller
  39. + usb1 - from USB2.0 controller 1
  40. + audio - from Audio module
  41. + sd_emmc_c - from SD eMMC c controller
  42. + spicc2 - from SPI controller 2
  43. + ethernet - from Ethernet controller
  44. Examples:
  45. + Show the total DDR bandwidth per seconds:
  46. .. code-block:: bash
  47. perf stat -a -e meson_ddr_bw/total_rw_bytes/ -I 1000 sleep 10
  48. + Show individual DDR bandwidth from CPU and GPU respectively, as well as
  49. sum of them:
  50. .. code-block:: bash
  51. perf stat -a -e meson_ddr_bw/chan_1_rw_bytes,arm=1/ -I 1000 sleep 10
  52. perf stat -a -e meson_ddr_bw/chan_2_rw_bytes,gpu=1/ -I 1000 sleep 10
  53. perf stat -a -e meson_ddr_bw/chan_3_rw_bytes,arm=1,gpu=1/ -I 1000 sleep 10