提问人:Frontier_Setter 提问时间:4/14/2023 更新时间:4/14/2023 访问量:46
为什么与 LLC 相关的性能事件在 perf 中共享相同的事件 ID?
Why LLC related performance events share the same event id in perf?
问:
我使用的是英特尔 spr 架构,内核版本为 5.14,性能版本为 4.18。
我试着根据这个答案中的方法分析LLC相关事件的含义,但发现所有事件都有相同的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,
},
},
此外,我检查了英特尔的 perfmon,发现许多事件共享相同的事件代码和 umask,仅通过 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"
},
...
在这种情况下,我应该如何区分 perfmon 数组中的哪个条目对应于 perf 中的每个 LLC 相关事件?
答: 暂无答案
评论