This is the mail archive of the
mailing list for the GCC project.
Re: Faster compilation speed: cache behavior
- From: "Timothy J. Wood" <tjw at omnigroup dot com>
- To: Segher Boessenkool <segher at chello dot nl>
- Cc: Kai Henningsen <kaih at khms dot westfalen dot de>, gcc at gcc dot gnu dot org
- Date: Wed, 21 Aug 2002 20:53:51 -0700
- Subject: Re: Faster compilation speed: cache behavior
On Wednesday, August 21, 2002, at 06:51 PM, Segher Boessenkool wrote:
Or maybe Apple's tool uses some different mechanism; in that case,
The CHUD tools have a couple different modes. There are four
different ways to trigger a sample, time interval, OS PMI (for
synthetic events like VM faults, system calls, etc), CPU PMI (cycles
elapsed, Altivec Float stall cycles, etc) and MC PMI (AGP R/W Hit Open
Page, Single Beat Xacts, etc) . The timer is configured by some real
time value. The PMI options are associated with a trigger counter
(another PMC) and have a trigger count. Thus, you could generate a
graph of the number of CPU cycles in each 1000 L3 Cache misses period.
CHUD also allows you to add some 'fuzz' to your sampling to help
avoid potentially synchronizing with the target timing. You can
configure fuzz from 0% to 50% -- the actual trigger count or timer
value that is used for the next sampling period is varied by the fuzz
percentage (I think it is only +, not +/-, but I'm not sure).
Each time the a sample is taken, the instruction pointer may have
nothing to do with the actual problem. For example, 999 of the dL3
misses might be due to routine foo(), but the 1000th might hit when
bar() is executing and bar() will get blamed. Thus, you can see that
it doesn't really matter what the PC is when the trigger goes off since
there are other sources of error. It just needs to be 'close' (where
'close' is some function of function size and sampling rate).
The saving grace, is that the statistical distribution of blame
eventually settles on the real offenders (possibly with help from some
fuzz). Clearly there are edge cases (like really small functions), but
as long as you know this, you can be on the lookout for it.
CHUD is amazingly powerful -- I've only made the most basic use of it
so far (and have described little of its capabilities here :)
More information at http://developer.apple.com/tools/debuggers.html