Intel CPUの Performance Monitoring Features を確認する
Intel CPU のPMCは、アーキテクチャによって使える数や機能が異なる これより前のプロセッサにおけるPMCの機能はすべてがModel-specificで、異なるモデルで同じものが動作する保証はない
機能セットにはバージョンが振られており、CPUIDにアクセスすることで確認できる
下の場合は Version 4
code:cpuid
sudo apt install cpuid
code:cpuid
❯ cpuid -1 | grep 'Performance Monitoring Features' -A 52
Architecture Performance Monitoring Features (0xa):
version ID = 0x4 (4)
number of counters per logical processor = 0x4 (4)
bit width of counter = 0x30 (48)
length of EBX bit vector = 0x7 (7)
core cycle event = available
instruction retired event = available
reference cycles event = available
last-level cache ref event = available
last-level cache miss event = available
branch inst retired event = available
branch mispred retired event = available
topdown slots event = not available
topdown backend bound = not available
topdown bad speculation = not available
topdown frontend bound = not available
topdown retiring = not available
LBR inserts = not available
fixed counter 0 supported = false
fixed counter 1 supported = false
fixed counter 2 supported = false
fixed counter 3 supported = false
fixed counter 4 supported = false
fixed counter 5 supported = false
fixed counter 6 supported = false
fixed counter 7 supported = false
fixed counter 8 supported = false
fixed counter 9 supported = false
fixed counter 10 supported = false
fixed counter 11 supported = false
fixed counter 12 supported = false
fixed counter 13 supported = false
fixed counter 14 supported = false
fixed counter 15 supported = false
fixed counter 16 supported = false
fixed counter 17 supported = false
fixed counter 18 supported = false
fixed counter 19 supported = false
fixed counter 20 supported = false
fixed counter 21 supported = false
fixed counter 22 supported = false
fixed counter 23 supported = false
fixed counter 24 supported = false
fixed counter 25 supported = false
fixed counter 26 supported = false
fixed counter 27 supported = false
fixed counter 28 supported = false
fixed counter 29 supported = false
fixed counter 30 supported = false
fixed counter 31 supported = false
number of contiguous fixed counters = 0x3 (3)
bit width of fixed counters = 0x30 (48)
anythread deprecation = false