Hello,
I used raw events to monitor L1 data cache reloads, L1 data cache castouts, L2 cache data accesses and L2 cache data hits. I used perf API in my c program so that I can reset and enable the counters as and when I need to profile a piece of code.
I get the following values for the events for the piece of code given here:
int a[16];
for(i = 0; i < 16; i++){
a[i] = i;
}
L1_cache_reloads 1
L1 cache castouts 0
L2 cache data accesses 18
L2 cache data hits 17
How can I interpret this data? The L2 data accesses are way too higher than L1 data cache reloads (L1 data misses).
Can someone explain what is going on?
I reset the counters and enable them before the for loop. The counting is disabled right after the for loop.
Thanks,
A Vasu