CCN.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ARM Cache Coherent Network
  2. ==========================
  3. CCN-504 is a ring-bus interconnect consisting of 11 crosspoints
  4. (XPs), with each crosspoint supporting up to two device ports,
  5. so nodes (devices) 0 and 1 are connected to crosspoint 0,
  6. nodes 2 and 3 to crosspoint 1 etc.
  7. PMU (perf) driver
  8. -----------------
  9. The CCN driver registers a perf PMU driver, which provides
  10. description of available events and configuration options
  11. in sysfs, see /sys/bus/event_source/devices/ccn*.
  12. The "format" directory describes format of the config, config1
  13. and config2 fields of the perf_event_attr structure. The "events"
  14. directory provides configuration templates for all documented
  15. events, that can be used with perf tool. For example "xp_valid_flit"
  16. is an equivalent of "type=0x8,event=0x4". Other parameters must be
  17. explicitly specified.
  18. For events originating from device, "node" defines its index.
  19. Crosspoint PMU events require "xp" (index), "bus" (bus number)
  20. and "vc" (virtual channel ID).
  21. Crosspoint watchpoint-based events (special "event" value 0xfe)
  22. require "xp" and "vc" as as above plus "port" (device port index),
  23. "dir" (transmit/receive direction), comparator values ("cmp_l"
  24. and "cmp_h") and "mask", being index of the comparator mask.
  25. Masks are defined separately from the event description
  26. (due to limited number of the config values) in the "cmp_mask"
  27. directory, with first 8 configurable by user and additional
  28. 4 hardcoded for the most frequent use cases.
  29. Cycle counter is described by a "type" value 0xff and does
  30. not require any other settings.
  31. The driver also provides a "cpumask" sysfs attribute, which contains
  32. a single CPU ID, of the processor which will be used to handle all
  33. the CCN PMU events. It is recommended that the user space tools
  34. request the events on this processor (if not, the perf_event->cpu value
  35. will be overwritten anyway). In case of this processor being offlined,
  36. the events are migrated to another one and the attribute is updated.
  37. Example of perf tool use:
  38. / # perf list | grep ccn
  39. ccn/cycles/ [Kernel PMU event]
  40. <...>
  41. ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/ [Kernel PMU event]
  42. <...>
  43. / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
  44. sleep 1
  45. The driver does not support sampling, therefore "perf record" will
  46. not work. Per-task (without "-a") perf sessions are not supported.