+
+ /* Perf per-CPU counters */
+ PERF_HW("perf:cpu:cpu-cycles", CPU_CYCLES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:cycles", CPU_CYCLES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:stalled-cycles-frontend", STALLED_CYCLES_FRONTEND,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:idle-cycles-frontend", STALLED_CYCLES_FRONTEND,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:stalled-cycles-backend", STALLED_CYCLES_BACKEND,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:idle-cycles-backend", STALLED_CYCLES_BACKEND,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:instructions", INSTRUCTIONS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:cache-references", CACHE_REFERENCES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:cache-misses", CACHE_MISSES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:branch-instructions", BRANCH_INSTRUCTIONS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:branches", BRANCH_INSTRUCTIONS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:branch-misses", BRANCH_MISSES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW("perf:cpu:bus-cycles", BUS_CYCLES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+
+ PERF_HW_CACHE("perf:cpu:L1-dcache", L1D,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW_CACHE("perf:cpu:L1-icache", L1I,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW_CACHE("perf:cpu:LLC", LL,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_HW_CACHE("perf:cpu:dTLB", DTLB,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ _PERF_HW_CACHE("perf:cpu:iTLB-loads", ITLB,
+ CONTEXT_PERF_CPU_COUNTER, READ, ACCESS, 0),
+ _PERF_HW_CACHE("perf:cpu:iTLB-load-misses", ITLB,
+ CONTEXT_PERF_CPU_COUNTER, READ, MISS, 0),
+ _PERF_HW_CACHE("perf:cpu:branch-loads", BPU,
+ CONTEXT_PERF_CPU_COUNTER, READ, ACCESS, 0),
+ _PERF_HW_CACHE("perf:cpu:branch-load-misses", BPU,
+ CONTEXT_PERF_CPU_COUNTER, READ, MISS, 0),
+
+ PERF_SW("perf:cpu:cpu-clock", CPU_CLOCK,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:task-clock", TASK_CLOCK,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:page-fault", PAGE_FAULTS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:faults", PAGE_FAULTS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:major-faults", PAGE_FAULTS_MAJ,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:minor-faults", PAGE_FAULTS_MIN,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:context-switches", CONTEXT_SWITCHES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:cs", CONTEXT_SWITCHES,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:cpu-migrations", CPU_MIGRATIONS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:migrations", CPU_MIGRATIONS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:alignment-faults", ALIGNMENT_FAULTS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+ PERF_SW("perf:cpu:emulation-faults", EMULATION_FAULTS,
+ CONTEXT_PERF_CPU_COUNTER, 0),
+
+ /* Perf per-thread counters */
+ PERF_HW("perf:thread:cpu-cycles", CPU_CYCLES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:cycles", CPU_CYCLES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:stalled-cycles-frontend", STALLED_CYCLES_FRONTEND,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:idle-cycles-frontend", STALLED_CYCLES_FRONTEND,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:stalled-cycles-backend", STALLED_CYCLES_BACKEND,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:idle-cycles-backend", STALLED_CYCLES_BACKEND,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:instructions", INSTRUCTIONS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:cache-references", CACHE_REFERENCES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:cache-misses", CACHE_MISSES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:branch-instructions", BRANCH_INSTRUCTIONS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:branches", BRANCH_INSTRUCTIONS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:branch-misses", BRANCH_MISSES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW("perf:thread:bus-cycles", BUS_CYCLES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+
+ PERF_HW_CACHE("perf:thread:L1-dcache", L1D,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW_CACHE("perf:thread:L1-icache", L1I,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW_CACHE("perf:thread:LLC", LL,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_HW_CACHE("perf:thread:dTLB", DTLB,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ _PERF_HW_CACHE("perf:thread:iTLB-loads", ITLB,
+ CONTEXT_PERF_THREAD_COUNTER, READ, ACCESS, 0),
+ _PERF_HW_CACHE("perf:thread:iTLB-load-misses", ITLB,
+ CONTEXT_PERF_THREAD_COUNTER, READ, MISS, 0),
+ _PERF_HW_CACHE("perf:thread:branch-loads", BPU,
+ CONTEXT_PERF_THREAD_COUNTER, READ, ACCESS, 0),
+ _PERF_HW_CACHE("perf:thread:branch-load-misses", BPU,
+ CONTEXT_PERF_THREAD_COUNTER, READ, MISS, 0),
+
+ PERF_SW("perf:thread:cpu-clock", CPU_CLOCK,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:task-clock", TASK_CLOCK,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:page-fault", PAGE_FAULTS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:faults", PAGE_FAULTS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:major-faults", PAGE_FAULTS_MAJ,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:minor-faults", PAGE_FAULTS_MIN,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:context-switches", CONTEXT_SWITCHES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:cs", CONTEXT_SWITCHES,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:cpu-migrations", CPU_MIGRATIONS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:migrations", CPU_MIGRATIONS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:alignment-faults", ALIGNMENT_FAULTS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+ PERF_SW("perf:thread:emulation-faults", EMULATION_FAULTS,
+ CONTEXT_PERF_THREAD_COUNTER, 0),
+
+ /*
+ * Perf per-CPU counters, backward compatibilty for names.
+ * Hidden from help listing.
+ */
+ PERF_HW("perf:cpu-cycles", CPU_CYCLES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:cycles", CPU_CYCLES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:stalled-cycles-frontend", STALLED_CYCLES_FRONTEND,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:idle-cycles-frontend", STALLED_CYCLES_FRONTEND,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:stalled-cycles-backend", STALLED_CYCLES_BACKEND,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:idle-cycles-backend", STALLED_CYCLES_BACKEND,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:instructions", INSTRUCTIONS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:cache-references", CACHE_REFERENCES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:cache-misses", CACHE_MISSES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:branch-instructions", BRANCH_INSTRUCTIONS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:branches", BRANCH_INSTRUCTIONS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:branch-misses", BRANCH_MISSES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW("perf:bus-cycles", BUS_CYCLES,
+ CONTEXT_PERF_COUNTER, 1),
+
+ PERF_HW_CACHE("perf:L1-dcache", L1D,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW_CACHE("perf:L1-icache", L1I,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW_CACHE("perf:LLC", LL,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_HW_CACHE("perf:dTLB", DTLB,
+ CONTEXT_PERF_COUNTER, 1),
+ _PERF_HW_CACHE("perf:iTLB-loads", ITLB,
+ CONTEXT_PERF_COUNTER, READ, ACCESS, 1),
+ _PERF_HW_CACHE("perf:iTLB-load-misses", ITLB,
+ CONTEXT_PERF_COUNTER, READ, MISS, 1),
+ _PERF_HW_CACHE("perf:branch-loads", BPU,
+ CONTEXT_PERF_COUNTER, READ, ACCESS, 1),
+ _PERF_HW_CACHE("perf:branch-load-misses", BPU,
+ CONTEXT_PERF_COUNTER, READ, MISS, 1),
+
+ PERF_SW("perf:cpu-clock", CPU_CLOCK,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:task-clock", TASK_CLOCK,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:page-fault", PAGE_FAULTS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:faults", PAGE_FAULTS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:major-faults", PAGE_FAULTS_MAJ,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:minor-faults", PAGE_FAULTS_MIN,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:context-switches", CONTEXT_SWITCHES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:cs", CONTEXT_SWITCHES,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:cpu-migrations", CPU_MIGRATIONS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:migrations", CPU_MIGRATIONS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:alignment-faults", ALIGNMENT_FAULTS,
+ CONTEXT_PERF_COUNTER, 1),
+ PERF_SW("perf:emulation-faults", EMULATION_FAULTS,
+ CONTEXT_PERF_COUNTER, 1),
+