CCN.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. For events originating from device, "node"
  18. defines its index. All crosspoint events require "xp" (index),
  19. "port" (device port number) and "vc" (virtual channel ID) and
  20. "dir" (direction). Watchpoints (special "event" value 0xfe) also
  21. require comparator values ("cmp_l" and "cmp_h") and "mask", being
  22. index of the comparator mask.
  23. Masks are defined separately from the event description
  24. (due to limited number of the config values) in the "cmp_mask"
  25. directory, with first 8 configurable by user and additional
  26. 4 hardcoded for the most frequent use cases.
  27. Cycle counter is described by a "type" value 0xff and does
  28. not require any other settings.
  29. Example of perf tool use:
  30. / # perf list | grep ccn
  31. ccn/cycles/ [Kernel PMU event]
  32. <...>
  33. ccn/xp_valid_flit/ [Kernel PMU event]
  34. <...>
  35. / # perf stat -C 0 -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
  36. sleep 1
  37. The driver does not support sampling, therefore "perf record" will
  38. not work. Also notice that only single cpu is being selected
  39. ("-C 0") - this is because perf framework does not support
  40. "non-CPU related" counters (yet?) so system-wide session ("-a")
  41. would try (and in most cases fail) to set up the same event
  42. per each CPU.