62 lines · plain
1==========================2ARM Cache Coherent Network3==========================4 5CCN-504 is a ring-bus interconnect consisting of 11 crosspoints6(XPs), with each crosspoint supporting up to two device ports,7so nodes (devices) 0 and 1 are connected to crosspoint 0,8nodes 2 and 3 to crosspoint 1 etc.9 10PMU (perf) driver11-----------------12 13The CCN driver registers a perf PMU driver, which provides14description of available events and configuration options15in sysfs, see /sys/bus/event_source/devices/ccn*.16 17The "format" directory describes format of the config, config118and config2 fields of the perf_event_attr structure. The "events"19directory provides configuration templates for all documented20events, that can be used with perf tool. For example "xp_valid_flit"21is an equivalent of "type=0x8,event=0x4". Other parameters must be22explicitly specified.23 24For events originating from device, "node" defines its index.25 26Crosspoint PMU events require "xp" (index), "bus" (bus number)27and "vc" (virtual channel ID).28 29Crosspoint watchpoint-based events (special "event" value 0xfe)30require "xp" and "vc" as above plus "port" (device port index),31"dir" (transmit/receive direction), comparator values ("cmp_l"32and "cmp_h") and "mask", being index of the comparator mask.33 34Masks are defined separately from the event description35(due to limited number of the config values) in the "cmp_mask"36directory, with first 8 configurable by user and additional374 hardcoded for the most frequent use cases.38 39Cycle counter is described by a "type" value 0xff and does40not require any other settings.41 42The driver also provides a "cpumask" sysfs attribute, which contains43a single CPU ID, of the processor which will be used to handle all44the CCN PMU events. It is recommended that the user space tools45request the events on this processor (if not, the perf_event->cpu value46will be overwritten anyway). In case of this processor being offlined,47the events are migrated to another one and the attribute is updated.48 49Example of perf tool use::50 51 / # perf list | grep ccn52 ccn/cycles/ [Kernel PMU event]53 <...>54 ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/ [Kernel PMU event]55 <...>56 57 / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \58 sleep 159 60The driver does not support sampling, therefore "perf record" will61not work. Per-task (without "-a") perf sessions are not supported.62