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]
Other format: [Raw text]

Re: Just a reminder of serious open 3.3 PRs


 > opt/8361 [3.3/3.4 regression] C++ compile-time performance regression
 > This is a 70% slowdown wrt. 3.0.4, and 30% wrt. 3.2.1.  It was blamed
 > on garbage collection and other things, but no real analysis was done
 > for this problem.  The "official" rule from the release criteria
 > states that "A release candidate's compile-time should not exceed GCC
 > 2.95.3 by more than 15% ..."  Here we have two times the maximum
 > slowdown with respect to the latest official release.  BTW This is
 > Gerald's PR that tracks g++ slowdown, ref.
 > http://gcc.gnu.org/ml/gcc/2002-04/msg01168.html (but read "3.3" for
 > "3.2" in the table, and keep in mind that 3.3 only slowed down *more*
 > since these timings were done).

I've analyzed PR8361 generate.ii via --time-report with last night's
3.2 and 3.3 CVS.  Looking at the numbers now, I don't think the
problem really is "garbage collection".  Even if it is partially to
blame for the time spent compiling, that segment is now much less of a
factor since the physmem patches went in.  With this addition, the
"garbage collection" times approach zero for large memory systems
(512Mb to 1Gb,) and when I run the testcase at -O0 on a large memory
solaris2.7 system, I get *faster* overall results for 3.3 than I do
for 3.2.  (The same can't be said for -O3 though.)

Even with the memory size crippled down to a simulated 32Mb or 64Mb
the isolated GC times are roughly comparable in 3.2 and 3.3.  I.e. the
majority of the actual slowdown came from somewhere else.

At -O0, the hot spots for --time-report were "garbage collection",
"parser" and "name lookup".  For -O3 compiles, again "name lookup" is
a big factor, given that it didn't exist in 3.2.  I also see that
"global CSE" is much worse.  But "expand" is a bit better.

One interesting thing is that in 3.3 both "parser" and especially
"name lookup" use a lot of system time, regardless of the RAM size.


So IMHO analyzing why "name lookup" is so bad and perhaps why "global
CSE" got worse would help with this PR.

		--Kaveh


I've included the top entries in timing runs for 3.2, and for 3.3 with
various simulated memory sizes at -O0 and -O3 with CVS from 20030406.
----------------------------------------------------------------------------
These are at -O0:

3.2 (Effectively RAM 32Mb)
 garbage collection    :  22.57 (26%) usr   0.04 ( 1%) sys  22.00 (24%) wall
 parser                :  33.95 (40%) usr   1.76 (33%) sys  37.00 (41%) wall
 global alloc          :   8.51 (10%) usr   0.12 ( 2%) sys   9.25 (10%) wall
 TOTAL                 :  85.75             5.26            91.00


3.3 (RAM 32Mb --param ggc-min-expand=30 --param ggc-min-heapsize=4096)
 garbage collection    :  24.94 (28%) usr   0.00 ( 0%) sys  25.50 (24%) wall
 parser                :  27.62 (31%) usr   5.95 (29%) sys  30.25 (28%) wall
 name lookup           :  10.05 (11%) usr  10.92 (53%) sys  20.50 (19%) wall
 global alloc          :   8.51 (10%) usr   0.09 ( 0%) sys   9.50 ( 9%) wall
 TOTAL                 :  87.77            20.61           108.50

3.3 (RAM 64Mb --param ggc-min-expand=34 --param ggc-min-heapsize=8192)
 garbage collection    :  21.93 (26%) usr   0.03 ( 0%) sys  22.25 (21%) wall
 parser                :  26.94 (32%) usr   5.82 (27%) sys  33.25 (31%) wall
 name lookup           :  10.02 (12%) usr  11.71 (54%) sys  22.00 (21%) wall
 global alloc          :   8.44 (10%) usr   0.10 ( 0%) sys   7.50 ( 7%) wall
 TOTAL                 :  84.20            21.63           106.00

3.3 (RAM 256Mb --param ggc-min-expand=47 --param ggc-min-heapsize=32768)
 garbage collection    :  10.78 (15%) usr   0.01 ( 0%) sys  10.50 (11%) wall
 parser                :  28.45 (39%) usr   5.64 (27%) sys  32.25 (34%) wall
 name lookup           :   9.53 (13%) usr  11.16 (54%) sys  23.00 (24%) wall
 global alloc          :   8.66 (12%) usr   0.07 ( 0%) sys  10.50 (11%) wall
 TOTAL                 :  73.86            20.82            95.00

3.3 (RAM 512Mb --param ggc-min-expand=65 --param ggc-min-heapsize=65536)
 garbage collection    :   1.97 ( 3%) usr   0.01 ( 0%) sys   2.00 ( 2%) wall
 parser                :  27.50 (42%) usr   6.60 (30%) sys  32.25 (37%) wall
 name lookup           :  10.60 (16%) usr  11.04 (51%) sys  21.00 (24%) wall
 global alloc          :   8.91 (14%) usr   0.17 ( 1%) sys   9.25 (11%) wall
 TOTAL                 :  65.04            21.81            86.75

3.3 (RAM 1Gb --param ggc-min-expand=100 --param ggc-min-heapsize=131072)
 garbage collection	<doesn't appear!>
 parser                :  28.73 (45%) usr   7.22 (30%) sys  35.25 (40%) wall
 name lookup           :   9.56 (15%) usr  11.27 (47%) sys  19.75 (23%) wall
 global alloc          :   8.65 (14%) usr   0.32 ( 1%) sys   8.25 ( 9%) wall
 TOTAL                 :  63.77            23.89            87.75
----------------------------------------------------------------------------
These are at -O3:

3.2 (Effectively RAM 32Mb)
 garbage collection    :  41.60 (19%) usr   0.04 ( 1%) sys  41.75 (18%) wall
 parser                :  33.38 (15%) usr   2.78 (42%) sys  36.25 (16%) wall
 expand                :  20.57 ( 9%) usr   0.08 ( 1%) sys  21.25 ( 9%) wall
 CSE                   :  28.62 (13%) usr   0.00 ( 0%) sys  30.25 (13%) wall
 global CSE            :   4.51 ( 2%) usr   0.04 ( 1%) sys   4.00 ( 2%) wall
 rename registers      :  14.22 ( 6%) usr   0.03 ( 0%) sys  16.50 ( 7%) wall
 TOTAL                 : 222.02             6.61           229.25


3.3 (RAM 32Mb --param ggc-min-expand=30 --param ggc-min-heapsize=4096)
 garbage collection    :  47.49 (17%) usr   0.02 ( 0%) sys  47.25 (16%) wall
 parser                :  28.40 (10%) usr   6.54 (31%) sys  37.50 (13%) wall
 name lookup           :   9.80 ( 4%) usr  11.16 (53%) sys  18.25 ( 6%) wall
 expand                :  14.84 ( 5%) usr   0.02 ( 0%) sys  12.25 ( 4%) wall
 CSE                   :  37.00 (14%) usr   0.01 ( 0%) sys  35.75 (12%) wall
 global CSE            :  12.81 ( 5%) usr   0.00 ( 0%) sys  14.00 ( 5%) wall
 rename registers      :  16.90 ( 6%) usr   0.02 ( 0%) sys  16.00 ( 5%) wall
 TOTAL                 : 271.62            20.95           292.50

3.3 (RAM 64Mb --param ggc-min-expand=34 --param ggc-min-heapsize=8192)
 garbage collection    :  42.19 (16%) usr   0.00 ( 0%) sys  42.50 (15%) wall
 parser                :  28.37 (11%) usr   6.13 (29%) sys  33.25 (12%) wall
 name lookup           :   9.82 ( 4%) usr  11.80 (56%) sys  22.50 ( 8%) wall
 expand                :  14.66 ( 6%) usr   0.01 ( 0%) sys  18.75 ( 7%) wall
 CSE                   :  37.28 (14%) usr   0.02 ( 0%) sys  34.00 (12%) wall
 global CSE            :  12.74 ( 5%) usr   0.00 ( 0%) sys  12.50 ( 4%) wall
 rename registers      :  16.92 ( 6%) usr   0.03 ( 0%) sys  16.25 ( 6%) wall
 TOTAL                 : 265.88            21.07           287.00

3.3 (RAM 256Mb --param ggc-min-expand=47 --param ggc-min-heapsize=32768)
 garbage collection    :  26.71 (11%) usr   0.00 ( 0%) sys  27.25 (10%) wall
 parser                :  27.90 (11%) usr   6.86 (31%) sys  33.75 (12%) wall
 name lookup           :   9.77 ( 4%) usr  11.85 (53%) sys  22.75 ( 8%) wall
 expand                :  14.64 ( 6%) usr   0.05 ( 0%) sys  15.50 ( 6%) wall
 CSE                   :  36.53 (15%) usr   0.03 ( 0%) sys  37.25 (14%) wall
 global CSE            :  12.77 ( 5%) usr   0.02 ( 0%) sys  12.75 ( 5%) wall
 rename registers      :  16.81 ( 7%) usr   0.05 ( 0%) sys  16.75 ( 6%) wall
 TOTAL                 : 248.13            22.17           270.25

3.3 (RAM 512Mb --param ggc-min-expand=65 --param ggc-min-heapsize=65536)
 garbage collection    :  14.58 ( 6%) usr   0.00 ( 0%) sys  14.50 ( 6%) wall
 parser                :  28.81 (12%) usr   7.18 (33%) sys  35.00 (13%) wall
 name lookup           :   9.63 ( 4%) usr  11.23 (51%) sys  21.25 ( 8%) wall
 expand                :  14.53 ( 6%) usr   0.02 ( 0%) sys  12.25 ( 5%) wall
 CSE                   :  36.47 (15%) usr   0.02 ( 0%) sys  38.50 (15%) wall
 global CSE            :  12.87 ( 5%) usr   0.01 ( 0%) sys  13.50 ( 5%) wall
 rename registers      :  16.82 ( 7%) usr   0.05 ( 0%) sys  17.50 ( 7%) wall
 TOTAL                 : 238.27            22.04           260.75

3.3 (RAM 1Gb --param ggc-min-expand=100 --param ggc-min-heapsize=131072)
 garbage collection    :   4.38 ( 2%) usr   0.00 ( 0%) sys   4.50 ( 2%) wall
 parser                :  28.58 (13%) usr   7.14 (30%) sys  33.50 (13%) wall
 name lookup           :  10.47 ( 5%) usr  11.11 (46%) sys  23.00 ( 9%) wall
 expand                :  14.45 ( 6%) usr   0.89 ( 4%) sys  14.00 ( 6%) wall
 CSE                   :  35.26 (16%) usr   0.16 ( 1%) sys  31.25 (12%) wall
 global CSE            :  12.60 ( 6%) usr   0.14 ( 1%) sys  14.25 ( 6%) wall
 rename registers      :  16.74 ( 7%) usr   0.09 ( 0%) sys  16.50 ( 7%) wall
 TOTAL                 : 225.97            24.19           251.00

----------------------------------------------------------------------------


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