Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

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

eandy
Beginner
962 Views
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



0 Kudos
2 Replies
Patrick_F_Intel1
Employee
962 Views
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

0 Kudos
Shannon_C_Intel
Employee
962 Views
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
0 Kudos
Reply