From gcc Mon Feb 10 08:22:10 2003 From: Kevin Puetz Date: Mon, 10 Feb 2003 08:22:10 +0000 To: gcc Subject: Re: cache misses in gcc 3.3 X-MARC-Message: https://marc.info/?l=gcc&m=104490560520983 >> I double checked with oprofile now (ordering the other way round) >> >> For dcaches it is not that much different - most of the functions >> idenitified as hot by cachegrind are hot in oprofile too. >> > I find this is only true sometimes, but i'm on a P4, probably > architecture differences. I last tried cachegrind at 1.0.2 or > thereabouts, maybe it's improved. > > When i used to use it, I found that those functions identified by > cachegrind generally are hot, but it missed the top cache missing > functions completely many times. > IE it's useful, but if you want to get the heavy hitters, you usually > need to do a real profile of some sort in addition. IIRC, the big difference is that cachgrind's model cannot see into the kernel, and oprofile's can. So cachgrind completely disregards any conditions in which the kernel blows the cache. I haven't verified this very well, but it has seemed to fit most conditions in which cachegrind and oprofile results differ greatly. >> I guess the difference can be explained in the difference methologies. >> cachegrind runs an exact model, while oprofile does an statistical >> sample (i used an NMI every 2000 events) and has to fight with an >> out-of-order CPU with a large issue window mixing instructions too. > Which is reality, unfortunately.