Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
share|improve this question

2 Answers 2

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..

share|improve this answer

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.

U need to load all these modules.

*Command for executing:* *VALGRIND:* valgrind --tool=cachegrind ./exe

PERFEXPERT: perfexpert_run_exp ./exe

PERF: perf stat -e ... -e ./exe

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.