This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cache misses in gcc 3.3
- From: Andi Kleen <ak at suse dot de>
- To: Mike Stump <mstump at apple dot com>
- Cc: gcc at gcc dot gnu dot org, tej at melbpc dot org dot au
- Date: 14 Feb 2003 00:13:53 +0100
- Subject: Re: cache misses in gcc 3.3
- References: <3E4BF17F.79322532@melbpc.org.au.suse.lists.egcs> <0FF24B64-3FA6-11D7-AFC7-003065A77310@apple.com.suse.lists.egcs>
Mike Stump <mstump@apple.com> writes:
> Not necessarily. At Apple, we use a magic instruction, akin to the
> read timestamp instruction on the x86. On the x86, it is 9 ticks of
> the processor clock on an AMD processor, and that is farily low, given
> how slow compiles actually are. One can inline and if the difference
> is < limit, just reuse the last gettimeofday time, and if >, it can
> call a real function to do it the slow way.
The TSCs are often turned off on large multiprocessor x86 SMP systems,
because they can go out of sync or the CPUs are deliberately clocked
at slightly different frequencies to make EMP shielding easier. So you
cannot rely on RDTSC working or giving meaningful answers.
-Andi