I want to collect OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP event on a cascadelake server. My CPU is Intel(R) Xeon(R) Gold 6230R, and my kernel is 4.18.0. I also tried Intel(R) Xeon(R) Gold 5218 with kernel 5.14.0, nothing different.
My perf version is 3.10.0-693.5.2.el7.x86_64.debug
Attempt 1: Directly use perf for collection
It is supported in kernel-5.14.
But my kernel version is too old, the corresponding offscore events cannot be directly used by the perf. The output of command "perf list | grep OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP" is empty.
update: perf can recognize this server as skylake, but still can't output events listed in skylake/memory.json
$ cat /sys/devices/cpu/caps/pmu_name
skylake
# perf list | grep offcore
[empty]
# perf list | grep rfo
[empty]
Attempt 2: Use PCM-raw to collect data
I followed this tutorial, but the numbers I collected were all 0.
# ./emon -C OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP --dry-run -m
Event Set 0
OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP (PerfEvtSel0 (0x186) = 0x00000000004301b7)
CC=ALL PC=0x0 UMASK=0x1 E=0x1 EDGE=0 INT=0x0 INV=0x0 CMASK=0x0 AMT=0x0
# pcm-raw -e core/config=0x00000000004301b7,name=OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP
,,,SKT0CORE0,SKT0CORE1,SKT0CORE2,...
Date,Time,ms,OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP,OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP,OCR.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP,...
2023-10-17,11:49:55.483,1001,0,0,0,... (all zero)
Perhaps it is because PCM-raw does not support the collection of offcore events.
Currently supported PMUs: core, m3upi, upi(ll)/qpi(ll), imc, m2m, pcu, cha/cbo, iio, ubox
Is there any way to collect corresponding counters?
Update Attempt 3: I tried to update kernel to 5.14, The result is the same as Attempt 1.