On 11/22/11 18:19:55, Michael Matz wrote:
> > This particular compilation (insn-emit.c) has been running for
> > 5.5 hours.  Typically, a full bootstrap (with minimal checks) would
> > finish in much less than 30 minutes on this server.
> 
> Yes, don't use --enable-checking=all for bootstraps.  =all enables some 
> _extremely_ slow checking, you should usually just use =yes (which is the 
> default for non-release branches).  This doesn't have to do with C vs C++ 
> as bootstrap compiler, though.

Michael,

Thanks for the tip.  Typically, we don't build with --enable-checking=all,
however ...

We build with --enable-checking=all when we're testing
major changes, moving GUPC to a new target architecture, etc.

In the past, it may have been slower, and certainly the final
compiler is slower (probably 3x-5x on average), but the extra checking
did help catch some bugs.

If --enable-checking=all is deemed currently unusable, perhaps it can be
re-designed so that the useful and not impractically expensive
checks are enabled but some other switch values are defined to
perform checks that are needed only in very specific circumstances.

This almost infinite compilation time seems like a new behavior to me,
and is potentially a side-effect of building with the g++ in the final stage.

FYI, on the *very* long running compilations that I checked,
the cc1plus compiler appeared to be stuck in the garbage collector.

#1  0x00000000009e838e in gt_ggc_mx_lang_tree_node (x_p=0x7fff268282d0)
    at ./gt-cp-tree.h:154
#2  0x00000000009e98fc in gt_ggc_mx_lang_tree_node (x_p=0x7ffef042ad00)
    at ./gt-cp-tree.h:381
#3  0x0000000000acf2be in gt_ggc_mx_cp_binding_level (x_p=0x7ffff17878c0)
    at ./gt-cp-name-lookup.h:80
#4  0x0000000000acf4c8 in gt_ggc_mx_cxx_binding (x_p=0x7fffec638f78)
    at ./gt-cp-name-lookup.h:105
[...]
#10 0x00000000009e984e in gt_ggc_mx_lang_tree_node (x_p=0x7ffee794f100)
    at ./gt-cp-tree.h:375
#11 0x000000000177eeac in gt_ggc_mx_cgraph_node (x_p=0x7ffef402ca20)
    at gtype-desc.c:693
#12 0x0000000001785fc9 in gt_ggc_m_P11cgraph_node4htab (x_p=0x7fffefbec3f0)
    at gtype-desc.c:2774
#13 0x00000000015c48cb in ggc_mark_root_tab (rt=0x4dbce40)
    at src/gupc/gcc/ggc-common.c:142
#14 0x00000000015c4967 in ggc_mark_roots ()
    at src/gupc/gcc/ggc-common.c:161

[this was compiling insn_emit.c.  It racked up 5 hours of cpu time
before I canceled the job.]

This sort of thing would appear to be unrelated to --enable-checking=all,
or at least it is surprising to me that --enable-checking=all would
end up causing the compiler to spend a lot of time in the garbage
collector.

I only checked two/three long-running compilations, but each of them
demonstrated a similar backtrace to that shown above.

I will try rebuilding with --disable-build-poststage1-with-cxx and
--enable-checking=all to try to determine if this is g++ specific
behavior.

- Gary

Reply via email to