This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cache misses in gcc 3.3


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]