==========
How to run
==========

(1) Build McKernel
(2) cd <mckernel>/test/perf_event
(3) make
(4) sh go_perf_test.sh

============
What to test
============

Check the performance monitoring of the following events.
For each event, monitor the target space in user space,
kernel space, or user+kernel space settings.

[PERF_TYPE_HARDWARE]
  1) PERF_COUNT_HW_CPU_CYCLES
  2) PERF_COUNT_HW_INSTRUCTIONS
  3) PERF_COUNT_HW_CACHE_REFERENCES
  4) PERF_COUNT_HW_CACHE_MISSES
  5) PERF_COUNT_HW_BRANCH_INSTRUCTIONS
  6) PERF_COUNT_HW_BRANCH_MISSES
  7) PERF_COUNT_HW_BUS_CYCLES
  8) PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
  9) PERF_COUNT_HW_STALLED_CYCLES_BACKEND
 10) PERF_COUNT_HW_REF_CPU_CYCLES

[PERF_TYPE_HW_CACHE]
  1) PERF_COUNT_HW_CACHE_L1D  | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
  2) PERF_COUNT_HW_CACHE_L1D  | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
  3) PERF_COUNT_HW_CACHE_L1D  | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
  4) PERF_COUNT_HW_CACHE_L1D  | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
  5) PERF_COUNT_HW_CACHE_L1D  | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
  6) PERF_COUNT_HW_CACHE_L1D  | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
  7) PERF_COUNT_HW_CACHE_L1I  | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
  8) PERF_COUNT_HW_CACHE_L1I  | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
  9) PERF_COUNT_HW_CACHE_L1I  | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 10) PERF_COUNT_HW_CACHE_L1I  | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
 11) PERF_COUNT_HW_CACHE_L1I  | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 12) PERF_COUNT_HW_CACHE_L1I  | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
 13) PERF_COUNT_HW_CACHE_LL   | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 14) PERF_COUNT_HW_CACHE_LL   | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
 15) PERF_COUNT_HW_CACHE_LL   | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 16) PERF_COUNT_HW_CACHE_LL   | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
 17) PERF_COUNT_HW_CACHE_LL   | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 18) PERF_COUNT_HW_CACHE_LL   | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
 19) PERF_COUNT_HW_CACHE_DTLB | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 20) PERF_COUNT_HW_CACHE_DTLB | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
 21) PERF_COUNT_HW_CACHE_DTLB | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 22) PERF_COUNT_HW_CACHE_DTLB | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
 23) PERF_COUNT_HW_CACHE_DTLB | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 24) PERF_COUNT_HW_CACHE_DTLB | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
 25) PERF_COUNT_HW_CACHE_ITLB | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 26) PERF_COUNT_HW_CACHE_ITLB | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
 27) PERF_COUNT_HW_CACHE_ITLB | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 28) PERF_COUNT_HW_CACHE_ITLB | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
 29) PERF_COUNT_HW_CACHE_ITLB | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 30) PERF_COUNT_HW_CACHE_ITLB | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
 31) PERF_COUNT_HW_CACHE_BPU  | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 32) PERF_COUNT_HW_CACHE_BPU  | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
 33) PERF_COUNT_HW_CACHE_BPU  | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 34) PERF_COUNT_HW_CACHE_BPU  | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
 35) PERF_COUNT_HW_CACHE_BPU  | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 36) PERF_COUNT_HW_CACHE_BPU  | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
 37) PERF_COUNT_HW_CACHE_NODE | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 38) PERF_COUNT_HW_CACHE_NODE | PERF_COUNT_HW_CACHE_OP_READ     | PERF_COUNT_HW_CACHE_RESULT_MISS
 39) PERF_COUNT_HW_CACHE_NODE | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 40) PERF_COUNT_HW_CACHE_NODE | PERF_COUNT_HW_CACHE_OP_WRITE    | PERF_COUNT_HW_CACHE_RESULT_MISS
 41) PERF_COUNT_HW_CACHE_NODE | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_ACCESS
 42) PERF_COUNT_HW_CACHE_NODE | PERF_COUNT_HW_CACHE_OP_PREFETCH | PERF_COUNT_HW_CACHE_RESULT_MISS
