Breaking up the 'parse' time into 'parse/bison' and 'parse/other'

Andi Kleen ak@suse.de
Tue Feb 25 20:19:00 GMT 2003


Tim Josling <tej@melbpc.org.au> writes:

> Recapping: Option -Q gives you a breakup of the time spent in the various
> compiler phases. It misleadingly, according to me, gives a high number for the
> parser because it also counts all the code in the parse 'actions'. So people
> are always suggesting we rewrite the parsers in native code.

Cache line profiling showed that the parser causes excessive cache misses
for its LALR(1) tables. Cache misses are slow.

> The plan is I will produce a patch that breaks parse time into "parse/bison"
> and "parse/actions", or some such wording.

Slowing it down even more by addings thousands of system calls?
(A system call is much slower than an ordinary function call on most
operating systems). Probably not a good idea.

If you want accurate profiling results use a real profiler.

-Andi



More information about the Gcc mailing list