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: High memory consumption compiling syntax.c


> Date: Mon, 1 Oct 2001 10:44:52 +0100
> From: Neil Booth <neil@daikokuya.demon.co.uk>
> 
> Which compiler is causing the problem?  3.0 and 3.0.1 had problems
> with runaway memory consumption if there is a lot of macro expansion
> (it could easily chew up 10 to 20 Megs).  That was fixed in 3.0.2;
> maybe you could try that?

No, I see this in all the versions since at least 2.7.2.1.  And I
don't see any significant change in memory consumption between 2.95.3
and 3.0.1, so the macros are probably not the reason.

Perhaps the output of -Q will help?  I attach it below (this is with
GCC 3.0.1).  Don't be alarmed about the zero sys time: the OS doesn't
provide that information, so the DJGPP library doesn't distinguish
between usr and sys, and all we have is the elapsed time.

Are there any other switches I could use to give you more information?

Anyway, thanks for the quick response.


D:\gnu\emacs\src>make syntax.o CFLAGS='-O2 -gcoff -Q' -W syntax.c
gcc -c  -Demacs -DHAVE_CONFIG_H   -I. -I.       -O2 -gcoff -Q syntax.c
update_syntax_table char_quoted inc_bytepos dec_bytepos find_defun_start prev_c
har_comend_first back_comment Fsyntax_table_p check_syntax_table Fsyntax_table Fstandard_syntax_table Fcopy_syntax_table Fset_syntax_table syntax_parent_lookup Fchar_syntax Fmatching_paren Fstring_to_syntax Fmodify_syntax_entry describe_syntax describe_syntax_1 Fdescribe_syntax scan_words Fforward_word Fskip_chars_forward Fskip_chars_backward Fskip_syntax_forward {GC 5325k -> 627k} Fskip_syntax_backward skip_chars forw_comment Fforward_comment scan_lists {GC 5355k -> 1246k} Fscan_lists Fscan_sexps Fbackward_prefix_chars scan_sexps_forward {GC 5439k -> 1415k} Fparse_partial_sexp init_syntax_once syms_of_syntax

Execution times (seconds)
garbage collection    :   0.16 ( 1%) usr   0.00 ( 0%) sys   0.16 ( 1%) wall
preprocessing         :   0.98 ( 4%) usr   0.00 ( 0%) sys   0.98 ( 4%) wall
lexical analysis      :   0.21 ( 1%) usr   0.00 ( 0%) sys   0.21 ( 1%) wall
parser                :   1.75 ( 8%) usr   0.00 ( 0%) sys   1.75 ( 8%) wall
varconst              :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
integration           :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
jump                  :   2.19 (10%) usr   0.00 ( 0%) sys   2.19 (10%) wall
CSE                   :   1.75 ( 8%) usr   0.00 ( 0%) sys   1.75 ( 8%) wall
global CSE            :   1.53 ( 7%) usr   0.00 ( 0%) sys   1.53 ( 7%) wall
loop analysis         :   1.31 ( 6%) usr   0.00 ( 0%) sys   1.31 ( 6%) wall
CSE 2                 :   1.48 ( 7%) usr   0.00 ( 0%) sys   1.48 ( 7%) wall
flow analysis         :   0.76 ( 3%) usr   0.00 ( 0%) sys   0.76 ( 3%) wall
combiner              :   1.37 ( 6%) usr   0.00 ( 0%) sys   1.37 ( 6%) wall
if-conversion         :   0.10 ( 0%) usr   0.00 ( 0%) sys   0.10 ( 0%) wall
regmove               :   1.04 ( 5%) usr   0.00 ( 0%) sys   1.04 ( 5%) wall
local alloc           :   0.76 ( 3%) usr   0.00 ( 0%) sys   0.76 ( 3%) wall
global alloc          :   1.86 ( 8%) usr   0.00 ( 0%) sys   1.86 ( 8%) wall
reload CSE regs       :   1.42 ( 6%) usr   0.00 ( 0%) sys   1.42 ( 6%) wall
flow 2                :   0.82 ( 4%) usr   0.00 ( 0%) sys   0.82 ( 4%) wall
if-conversion 2       :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
peephole 2            :   0.10 ( 0%) usr   0.00 ( 0%) sys   0.10 ( 0%) wall
scheduling 2          :   1.81 ( 8%) usr   0.00 ( 0%) sys   1.81 ( 8%) wall
reorder blocks        :   0.10 ( 0%) usr   0.00 ( 0%) sys   0.10 ( 0%) wall
shorten branches      :   0.27 ( 1%) usr   0.00 ( 0%) sys   0.27 ( 1%) wall
reg stack             :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
final                 :   0.27 ( 1%) usr   0.00 ( 0%) sys   0.27 ( 1%) wall
symout                :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
rest of compilation   :   0.49 ( 2%) usr   0.00 ( 0%) sys   0.49 ( 2%) wall
TOTAL                 :  22.74             0.00            22.74


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