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: Mike Stump <mstump at apple dot com>
- To: Tim Josling <tej at melbpc dot org dot au>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, gcc at gcc dot gnu dot org
- Date: Thu, 13 Feb 2003 14:54:09 -0800
- Subject: Re: cache misses in gcc 3.3
On Thursday, February 13, 2003, at 11:26 AM, Tim Josling wrote:
So would I - but there would be hundreds of thousands of calls out of
the
parse; to wrap these in timvar would be prohibitive.
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.
One approach I thought of could be to do sampling by setting regular
interrupts based on timeouts and check if the IP pointed into bison
(i.e. a kind of poor man's gprof), however it would be difficult to do
this portably.
Ack, please, no.