HOW to get the L1,L2 Cache Miss of an intel i5 Sandy Bridge

HOW to get the L1,L2 Cache Miss of an intel i5 Sandy Bridge

eandy's picture

Hello, I am working with Vtune Amplifier XE it works fine so far, but with the i5 Sandy Bridge CPU(i5-2400)i have some problem.
1. How can i count the sum of L1 and L2 misses ? I cannot find any event for it! 2. Are there some formulas to calculated it?
Can you please help me?

Regards
Andr


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Patrick Fay (Intel)'s picture

Hello Andre,
You can count L1 load hits and L1 load misses with:

MEM_UOPS_RETIRED.ALL_LOADS
MEM_LOAD_UOPS_RETIRED.L1_HIT

Then you can compute:
%L1D_load_hit = 100.0*MEM_LOAD_UOPS_RETIRED.L1_HIT / MEM_UOPS_RETIRED.ALL_LOADS
and
%L1D_load_miss= 100.0*(MEM_UOPS_RETIRED.ALL_LOADS - MEM_LOAD_UOPS_RETIRED.L1_HIT) / MEM_UOPS_RETIRED.ALL_LOADS

For the L2 load hit and miss you can use:
L2_RQSTS.DEMAND_DATA_RD_HIT
L2_RQSTS.ALL_DEMAND_DATA_RD

Then you can compute:
%L2_demand_rd_hit = 100.0 * L2_RQSTS.DEMAND_DATA_RD_HIT / L2_RQSTS.ALL_DEMAND_DATA_RD
%L2_demand_rd_miss = 100.0 * (L2_RQSTS.ALL_DEMAND_DATA_RD - L2_RQSTS.DEMAND_DATA_RD_HIT) / L2_RQSTS.ALL_DEMAND_DATA_RD

I hope this helps,
Pat

Shannon Cepeda (Intel)'s picture

Andre,
I have given an answer specific to Intel VTune Amplifier XE and the events it can count back on your first thread here: http://software.intel.com/en-us/forums/showthread.php?t=102467
It also gives instructions on how to find and use the events in VTune.
Thanks,
Shannon

Login to leave a comment.