xgene-pmu.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. APM X-Gene SoC Performance Monitoring Unit (PMU)
  2. ================================================
  3. X-Gene SoC PMU consists of various independent system device PMUs such as
  4. L3 cache(s), I/O bridge(s), memory controller bridge(s) and memory
  5. controller(s). These PMU devices are loosely architected to follow the
  6. same model as the PMU for ARM cores. The PMUs share the same top level
  7. interrupt and status CSR region.
  8. PMU (perf) driver
  9. -----------------
  10. The xgene-pmu driver registers several perf PMU drivers. Each of the perf
  11. driver provides description of its available events and configuration options
  12. in sysfs, see /sys/devices/<l3cX/iobX/mcbX/mcX>/.
  13. The "format" directory describes format of the config (event ID),
  14. config1 (agent ID) fields of the perf_event_attr structure. The "events"
  15. directory provides configuration templates for all supported event types that
  16. can be used with perf tool. For example, "l3c0/bank-fifo-full/" is an
  17. equivalent of "l3c0/config=0x0b/".
  18. Most of the SoC PMU has a specific list of agent ID used for monitoring
  19. performance of a specific datapath. For example, agents of a L3 cache can be
  20. a specific CPU or an I/O bridge. Each PMU has a set of 2 registers capable of
  21. masking the agents from which the request come from. If the bit with
  22. the bit number corresponding to the agent is set, the event is counted only if
  23. it is caused by a request from that agent. Each agent ID bit is inversely mapped
  24. to a corresponding bit in "config1" field. By default, the event will be
  25. counted for all agent requests (config1 = 0x0). For all the supported agents of
  26. each PMU, please refer to APM X-Gene User Manual.
  27. Each perf driver also provides a "cpumask" sysfs attribute, which contains a
  28. single CPU ID of the processor which will be used to handle all the PMU events.
  29. Example for perf tool use:
  30. / # perf list | grep -e l3c -e iob -e mcb -e mc
  31. l3c0/ackq-full/ [Kernel PMU event]
  32. <...>
  33. mcb1/mcb-csw-stall/ [Kernel PMU event]
  34. / # perf stat -a -e l3c0/read-miss/,mcb1/csw-write-request/ sleep 1
  35. / # perf stat -a -e l3c0/read-miss,config1=0xfffffffffffffffe/ sleep 1
  36. The driver does not support sampling, therefore "perf record" will
  37. not work. Per-task (without "-a") perf sessions are not supported.