50 lines · plain
1================================================2APM X-Gene SoC Performance Monitoring Unit (PMU)3================================================4 5X-Gene SoC PMU consists of various independent system device PMUs such as6L3 cache(s), I/O bridge(s), memory controller bridge(s) and memory7controller(s). These PMU devices are loosely architected to follow the8same model as the PMU for ARM cores. The PMUs share the same top level9interrupt and status CSR region.10 11PMU (perf) driver12-----------------13 14The xgene-pmu driver registers several perf PMU drivers. Each of the perf15driver provides description of its available events and configuration options16in sysfs, see /sys/bus/event_source/devices/<l3cX/iobX/mcbX/mcX>/.17 18The "format" directory describes format of the config (event ID),19config1 (agent ID) fields of the perf_event_attr structure. The "events"20directory provides configuration templates for all supported event types that21can be used with perf tool. For example, "l3c0/bank-fifo-full/" is an22equivalent of "l3c0/config=0x0b/".23 24Most of the SoC PMU has a specific list of agent ID used for monitoring25performance of a specific datapath. For example, agents of a L3 cache can be26a specific CPU or an I/O bridge. Each PMU has a set of 2 registers capable of27masking the agents from which the request come from. If the bit with28the bit number corresponding to the agent is set, the event is counted only if29it is caused by a request from that agent. Each agent ID bit is inversely mapped30to a corresponding bit in "config1" field. By default, the event will be31counted for all agent requests (config1 = 0x0). For all the supported agents of32each PMU, please refer to APM X-Gene User Manual.33 34Each perf driver also provides a "cpumask" sysfs attribute, which contains a35single CPU ID of the processor which will be used to handle all the PMU events.36 37Example for perf tool use::38 39 / # perf list | grep -e l3c -e iob -e mcb -e mc40 l3c0/ackq-full/ [Kernel PMU event]41 <...>42 mcb1/mcb-csw-stall/ [Kernel PMU event]43 44 / # perf stat -a -e l3c0/read-miss/,mcb1/csw-write-request/ sleep 145 46 / # perf stat -a -e l3c0/read-miss,config1=0xfffffffffffffffe/ sleep 147 48The driver does not support sampling, therefore "perf record" will49not work. Per-task (without "-a") perf sessions are not supported.50