I am using PAPI for measuring cache miss rates among L1,L2 and L3.
I used the formulas given here – source
I’ll just mention them here –
L1 cache miss rate = L1_Misses / (Loads + Stores) = PAPI_L1_TCM / PAPI_LST_INS
L2 cache miss rate = L2_Misses / L1_Misses = PAPI_L2_TCM / PAPI_L1_TCM
Using the above I thought L3 cache miss rate = L3_Misses / L2_Misses = PAPI_L3_TCM / PAPI_L2_TCM
{
"cpu in mhz":"3000",
"threads":[
{
"id":"140207004632960",
"regions":[
{
"test":{
"region_count":"1",
"cycles":"2867942814518",
"PAPI_L1_DCM":"75009278937",
"PAPI_L2_DCM":"75036590198",
"PAPI_L2_DCA":"39547106",
"PAPI_L3_TCM":"174614",
"PAPI_L3_TCA":"75042630482",
"PAPI_BR_MSP":"2697897",
"PAPI_TLB_IM":"232409"
}
}
]
}
]
}
These are the values I got. I am doing the calculations for a different code, not the one mentioned in the link above.
Using the formulas given above, the L2 miss rate comes out to be greater than 1.
What does this signify? Or is this completely the wrong way to do such calculations?
If it matters, I use
export PAPI_EVENTS="PAPI_L1_DCM,PAPI_L1_DCA,PAPI_L2_DCM,PAPI_L2_DCA,PAPI_L3_TCM,PAPI_L3_TCA,PAPI_BR_MSP,PAPI_TLB_IM,PAPI_TLB_DM,PAPI_TLB_TL"
and make PAPI regions in the code as required.
Thank you.