I am using Intel spr architecture, with a kernel version of 5.14 and a perf version of 4.18.
I tried to analyze the meaning of LLC related events based on the method in this answer, but found that all events have the same ID:
[ C(LL ) ] = {
[ C(OP_READ) ] = {
[ C(RESULT_ACCESS) ] = 0x12a,
[ C(RESULT_MISS) ] = 0x12a,
},
[ C(OP_WRITE) ] = {
[ C(RESULT_ACCESS) ] = 0x12a,
[ C(RESULT_MISS) ] = 0x12a,
},
},
Furthermore, I checked Intel's perfmon and found that many events share the same eventcode and umask, only distinguished by MSRValue.
{
"EventCode": "0x2A,0x2B", <== same
"UMask": "0x01", <== same
"EventName": "OCR.DEMAND_DATA_RD.ANY_RESPONSE",
"BriefDescription": "Counts demand data reads that have any type of response.",
"PublicDescription": "Counts demand data reads that have any type of response.",
"Counter": "0,1,2,3",
"PEBScounters": "0",
"SampleAfterValue": "100003",
"MSRIndex": "0x1a6,0x1a7",
"MSRValue": "0x10001", <== different
"CollectPEBSRecord": "0",
"TakenAlone": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0",
"PEBS": "0",
"Data_LA": "0",
"L1_Hit_Indication": "0",
"Errata": "null",
"Offcore": "1",
"Deprecated": "0",
"Speculative": "0"
},
{
"EventCode": "0x2A,0x2B",
"UMask": "0x01",
"EventName": "OCR.DEMAND_RFO.ANY_RESPONSE",
"BriefDescription": "Counts demand reads for ownership (RFO) requests and software prefetches for exclusive ownership (PREFETCHW) that have any type of response.",
"PublicDescription": "Counts demand reads for ownership (RFO) requests and software prefetches for exclusive ownership (PREFETCHW) that have any type of response.",
"Counter": "0,1,2,3",
"PEBScounters": "0",
"SampleAfterValue": "100003",
"MSRIndex": "0x1a6,0x1a7",
"MSRValue": "0x3F3FFC0002",
"CollectPEBSRecord": "0",
"TakenAlone": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0",
"PEBS": "0",
"Data_LA": "0",
"L1_Hit_Indication": "0",
"Errata": "null",
"Offcore": "1",
"Deprecated": "0",
"Speculative": "0"
},
...
In this case, how should I distinguish which entry in the perfmon array corresponds to each LLC related event in perf?