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]

Re: Kudos to the gcc developers


> On Thu, Nov 30, 2000 at 11:45:25AM -0500, Brad Lucier wrote:
> > 
> > 1.  After Michael Matz's dominators calculation was integrated into
> > gcc, I ran a profiled version to see what the next significant "hot
> > spot" was in the compiler.  I couldn't find one.
> 
> Hm, this surprises me.  The profiles I do show significant time
> (i.e. >5%) in the garbage collector and sometimes in CSE (not GCSE).

I didn't say there weren't any, just that I couldn't find one.

I no longer have a profiled cc1 around, but here are some typical statistics:

popov-259% ../../gcc/objdir/gcc/cc1 -O2 -fno-math-errno -mcpu=ev6 -mieee -gstabs _io.i
 __copysignf copysignf __copysign copysign __fabsf fabsf __fabs fabs __floorf __floor floorf floor __fdimf fdimf __fdim fdim vprintf getchar getc_unlocked getchar_unlocked putchar fputc_unlocked putc_unlocked putchar_unlocked feof_unlocked ferror_unlocked strtod strtol strtoul strtoq strtouq strtoll strtoull {GC 5327k -> 1339k} atof atoi atol atoll __strcpy_small __strcspn_c1 __strcspn_c2 __strcspn_c3 __strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2 __strpbrk_c3 __strtok_r_1c __strsep_1c __strsep_2c __strsep_3c __strsep_g __sigismember __sigaddset __sigdelset stat lstat fstat mknod __cmsg_nxthdr ___H__20___io {GC 48844k -> 13388k} {GC 17896k -> 12948k} {GC 17034k -> 13733k} {GC 19371k -> 15225k} {GC 23524k -> 15888k} {GC 31786k -> 16422k} ___init_proc {GC 23156k -> 5305k} {GC 8653k -> 6477k} ____20___io
Execution times (seconds)
 garbage collection    :   1.03 ( 1%) usr   0.01 ( 0%) sys   1.04 ( 1%) wall
 preprocessing         :   0.49 ( 1%) usr   0.16 ( 4%) sys   0.66 ( 1%) wall
 lexical analysis      :   0.66 ( 1%) usr   0.31 ( 8%) sys   0.96 ( 1%) wall
 parser                :   2.17 ( 3%) usr   0.26 ( 7%) sys   2.45 ( 3%) wall
 varconst              :   0.11 ( 0%) usr   0.00 ( 0%) sys   0.11 ( 0%) wall
 integration           :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
 jump                  :   6.20 ( 9%) usr   0.11 ( 3%) sys   6.32 ( 8%) wall
 CSE                   :   1.67 ( 2%) usr   0.00 ( 0%) sys   1.67 ( 2%) wall
 global CSE            :  16.22 (23%) usr   0.43 (11%) sys  16.65 (22%) wall
 loop analysis         :   0.15 ( 0%) usr   0.00 ( 0%) sys   0.15 ( 0%) wall
 CSE 2                 :   1.50 ( 2%) usr   0.00 ( 0%) sys   1.50 ( 2%) wall
 flow analysis         :   0.95 ( 1%) usr   0.24 ( 6%) sys   1.19 ( 2%) wall
 combiner              :   1.02 ( 1%) usr   0.00 ( 0%) sys   1.03 ( 1%) wall
 if-conversion         :   0.23 ( 0%) usr   0.02 ( 1%) sys   0.26 ( 0%) wall
 regmove               :   0.40 ( 1%) usr   0.00 ( 0%) sys   0.40 ( 1%) wall
 scheduling            :   6.01 ( 8%) usr   0.97 (26%) sys   6.98 ( 9%) wall
 local alloc           :   8.76 (12%) usr   0.01 ( 0%) sys   8.77 (12%) wall
 global alloc          :   2.18 ( 3%) usr   0.07 ( 2%) sys   2.25 ( 3%) wall
 reload CSE regs       :  12.87 (18%) usr   0.02 ( 1%) sys  12.89 (17%) wall
 flow 2                :   1.54 ( 2%) usr   0.19 ( 5%) sys   1.73 ( 2%) wall
 if-conversion 2       :   0.05 ( 0%) usr   0.01 ( 0%) sys   0.06 ( 0%) wall
 peephole 2            :   0.11 ( 0%) usr   0.00 ( 0%) sys   0.11 ( 0%) wall
 scheduling 2          :   5.35 ( 8%) usr   0.86 (23%) sys   6.22 ( 8%) wall
 reorder blocks        :   0.12 ( 0%) usr   0.00 ( 0%) sys   0.12 ( 0%) wall
 shorten branches      :   0.09 ( 0%) usr   0.00 ( 0%) sys   0.10 ( 0%) wall
 final                 :   0.55 ( 1%) usr   0.01 ( 0%) sys   0.56 ( 1%) wall
 symout                :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
 rest of compilation   :   0.60 ( 1%) usr   0.00 ( 0%) sys   0.60 ( 1%) wall
 TOTAL                 :  71.16             3.77            74.91

and if gcse is run 3 times:

popov-205% ../../gcc/objdir/gcc/cc1 -O2 -fno-math-errno -mcpu=ev6 -mieee -fgcse-
limit=3 -da -gstabs _io.i
 __copysignf copysignf __copysign copysign __fabsf fabsf __fabs fabs __floorf __
floor floorf floor __fdimf fdimf __fdim fdim vprintf getchar getc_unlocked getch
ar_unlocked putchar fputc_unlocked putc_unlocked putchar_unlocked feof_unlocked 
ferror_unlocked strtod strtol strtoul strtoq strtouq strtoll strtoull {GC 5327k 
-> 1339k} atof atoi atol atoll __strcpy_small __strcspn_c1 __strcspn_c2 __strcsp
n_c3 __strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2 __strpbrk_c3 __strtok_r_1c
 __strsep_1c __strsep_2c __strsep_3c __strsep_g __sigismember __sigaddset __sigd
elset stat lstat fstat mknod __cmsg_nxthdr ___H__20___io {GC 48844k -> 13388k} {
GC 17430k -> 13225k} {GC 18441k -> 13790k} {GC 19310k -> 15226k} {GC 23395k -> 1
5780k} {GC 31667k -> 16333k} ___init_proc {GC 23067k -> 5306k} {GC 8654k -> 6478
k} ____20___io
Execution times (seconds)
 garbage collection    :   1.10 ( 1%) usr   0.03 ( 0%) sys   1.14 ( 1%) wall
 dump files            :  41.15 (26%) usr   3.16 (26%) sys  44.50 (26%) wall
 preprocessing         :   0.52 ( 0%) usr   0.18 ( 1%) sys   0.69 ( 0%) wall
 lexical analysis      :   0.63 ( 0%) usr   0.31 ( 3%) sys   0.93 ( 1%) wall
 parser                :   2.30 ( 1%) usr   0.40 ( 3%) sys   2.72 ( 2%) wall
 varconst              :   0.10 ( 0%) usr   0.01 ( 0%) sys   0.11 ( 0%) wall
 integration           :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
 jump                  :   7.03 ( 4%) usr   0.24 ( 2%) sys   7.32 ( 4%) wall
 CSE                   :   1.98 ( 1%) usr   0.07 ( 1%) sys   2.06 ( 1%) wall
 global CSE            :  36.75 (23%) usr   1.93 (16%) sys  38.69 (23%) wall
 loop analysis         :   0.16 ( 0%) usr   0.00 ( 0%) sys   0.16 ( 0%) wall
 CSE 2                 :   1.84 ( 1%) usr   0.04 ( 0%) sys   1.89 ( 1%) wall
 flow analysis         :   1.65 ( 1%) usr   0.43 ( 4%) sys   2.08 ( 1%) wall
 combiner              :   1.01 ( 1%) usr   0.01 ( 0%) sys   1.03 ( 1%) wall
 if-conversion         :   0.30 ( 0%) usr   0.04 ( 0%) sys   0.35 ( 0%) wall
 regmove               :   0.42 ( 0%) usr   0.00 ( 0%) sys   0.42 ( 0%) wall
 scheduling            :   8.96 ( 6%) usr   2.49 (20%) sys  11.49 ( 7%) wall
 local alloc           :  14.92 ( 9%) usr   0.09 ( 1%) sys  15.02 ( 9%) wall
 global alloc          :  12.52 ( 8%) usr   0.23 ( 2%) sys  12.75 ( 7%) wall
 reload CSE regs       :  14.19 ( 9%) usr   0.06 ( 1%) sys  14.25 ( 8%) wall
 flow 2                :   2.12 ( 1%) usr   0.42 ( 3%) sys   2.54 ( 1%) wall
 if-conversion 2       :   0.06 ( 0%) usr   0.01 ( 0%) sys   0.08 ( 0%) wall
 peephole 2            :   0.12 ( 0%) usr   0.00 ( 0%) sys   0.12 ( 0%) wall
 scheduling 2          :   7.73 ( 5%) usr   2.04 (17%) sys   9.83 ( 6%) wall
 reorder blocks        :   0.15 ( 0%) usr   0.00 ( 0%) sys   0.15 ( 0%) wall
 shorten branches      :   0.10 ( 0%) usr   0.00 ( 0%) sys   0.11 ( 0%) wall
 final                 :   0.57 ( 0%) usr   0.01 ( 0%) sys   0.59 ( 0%) wall
 symout                :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
 rest of compilation   :   0.65 ( 0%) usr   0.00 ( 0%) sys   0.65 ( 0%) wall
 TOTAL                 : 159.18            12.31           171.85


So I don't find GC a problem for my codes.

Brad

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