It looks like by default PAPI (Performance Application Programming Interface) is not supporting to measure last-level cache misses (L3) on my AMD machine running Ubuntu Linux. However, I can measure L1/L2 cache misses. You can see the details of the processor below. I heard that it is possible to measure last level cache misses if install appropriate driver. Could some one provide me more information about this, please?

$ uname -a
Linux 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux

$cat /proc/cpuinfo
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model       : 8
model name  : Six-Core AMD Opteron(tm) Processor 8431
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt
bogomips    : 4788.66
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

2 Answers 2


Try using Valgrind's cache grind profiler or perf or perf expert.

All of these will give LastLevel cache details as L3 turns out to be in most of the cases.

You need to load all these modules.

Command for executing:


valgrind --tool=cachegrind ./exe


perfexpert_run_exp ./exe


perf stat -e <hardware counter> ... -e <hardwarecounter> ./exe

you can also use perf tool. first you need to check whether your counters are able to count last level cache misses or not by using "perf list" command. then you can read them with perf_record..

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .