This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Oct 2012 22:19:55 +0000
- Subject: [Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO
- Auto-submitted: auto-generated
- References: <bug-45375-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375
--- Comment #142 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-10-08 22:19:55 UTC ---
After updating Mozilla this weekend, I definitely bloat up 8GB machine. The pak
in TOP is around 9-10GB. I checked malloc usage and there are not many
surprises. It is about 300MB, mostly GGC overhead, pointer maps and such.
Most memory is actually the GGC, about 7GB. Here 5GB survives type and decl
merging and is distributed as follows:
cgraph.c:722 (cgraph_allocate_init_indirect_info 1671240: 0.0% 0:
0.0% 8202960: 0.2% 0: 0.0% 246855
tree.c:1226 (build_int_cst_wide) 625825208:12.3% 0:
0.0% 10437744: 0.2% 4863752: 3.1% 325009
ipa-prop.h:471 (ipa_check_create_edge_args) 0: 0.0% 0:
0.0% 16777216: 0.3% 0: 0.0% 1
ipa-inline-analysis.c:3697 (inline_read_section) 0: 0.0% 28298904:
1.6% 21095504: 0.4% 1064480: 0.7% 423701
tree.c:1561 (build_string) 16526800: 0.3% 0:
0.0% 21695715: 0.4% 3395427: 2.2% 864326
ipa-prop.c:3393 (ipa_read_node_info) 0: 0.0% 4302088:
0.2% 25029448: 0.5% 119192: 0.1% 246788
stringpool.c:75 (alloc_node) 0: 0.0% 0:
0.0% 27817760: 0.5% 0: 0.0% 695444
ipa-ref.c:51 (ipa_record_reference) 0: 0.0%
188442816:10.3% 28443272: 0.6% 2114424: 1.4% 1256259
stringpool.c:58 (stringpool_ggc_alloc) 0: 0.0% 0:
0.0% 34673092: 0.7% 2619412: 1.7% 695444
lto/lto.c:2279 (create_subid_section_table) 275832: 0.0% 0:
0.0% 40363416: 0.8% 8051472: 5.2% 3978
tree-streamer-in.c:895 (lto_input_ts_constructor 171812232: 3.4%
192568640:10.6% 42205992: 0.8% 1425072: 0.9% 947082
ipa-prop.c:3380 (ipa_read_node_info) 0: 0.0% 35825488:
2.0% 58764528: 1.1% 659704: 0.4% 909232
tree-streamer-in.c:488 (streamer_alloc_tree) 129846168: 2.6% 0:
0.0% 75997752: 1.5% 7072: 0.0% 2063753
tree.c:1263 (build_int_cst_wide) 237791264: 4.7% 0:
0.0% 90464320: 1.8% 0: 0.0% 10257987
ipa-inline-analysis.c:3709 (inline_read_section) 0: 0.0% 133938484:
7.4% 101874268: 2.0% 1606480: 1.0% 1099389
lto-section-in.c:361 (lto_new_in_decl_state) 3240: 0.0% 0:
0.0% 107452560: 2.1% 0: 0.0% 895465
cgraph.c:653 (cgraph_create_edge_1) 0: 0.0% 0:
0.0% 135509816: 2.6% 0: 0.0% 1302979
ggc-common.c:253 (ggc_cleared_alloc_ptr_array_tw 2040: 0.0%
866397160:47.6% 190623368: 3.7% 263888: 0.2% 11459
lto/lto.c:267 (lto_read_in_decl_state) 3024: 0.0% 0:
0.0% 225743280: 4.4% 41057176:26.5% 6268255
ipa-inline-analysis.c:931 (inline_summary_alloc) 0: 0.0% 0:
0.0% 268435464: 5.2% 8: 0.0% 1
cgraph.c:362 (cgraph_allocate_node) 0: 0.0% 0:
0.0% 515473640:10.1% 0: 0.0% 1741465
toplev.c:953 (realloc_for_line_map) 0: 0.0%
358955168:19.7% 1074790424:21.0% 184: 0.0% 19
tree-streamer-in.c:499 (streamer_alloc_tree) 3668091656:72.1% 0:
0.0% 1995384408:38.9% 87485792:56.5% 46580224
Total 5089831352 1821058652
5124870115 154815271 91384962
source location Garbage Freed
Leak Overhead Times
I.e. 20% are now linemaps, 38% trees read by the streamer, 10% cgraph nodes, 5%
inline summaries, 4% streamer table converting UIDs to decls (that can be
freed).
The trees are distributed as follows:
Kind Nodes Bytes
---------------------------------------
decls 20489087 -1105370640
types 10321297 1733977896
blocks 102012 8160960
stmts 0 0
refs 44297 1806000
exprs 8205133 264995952
constants 11667038 376994197
identifiers 695444 27817760
vecs 325009 626535448
binfos 2063753 205829776
ssa names 0 0
constructors 369886 8877264
random kinds 7039351 281574472
lang_decl kinds 0 0
lang_type kinds 0 0
omp clauses 0 0
---------------------------------------
Total 61322307 -1863768211
---------------------------------------
Code Nodes
I think all the blocks read to WPA are bugs. We may also do better on sharing
constants.
----------------------------
identifier_node 695444
tree_list 7039346
tree_vec 325009
block 102012
offset_type 1762
enumeral_type 371554
boolean_type 7097
integer_type 830019
real_type 10054
pointer_type 3089539
reference_type 215629
array_type 204968
record_type 3818337
union_type 77106
void_type 1478
function_type 259759
method_type 1433688
integer_cst 10784917
real_cst 17553
string_cst 864326
function_decl 2736272
label_decl 82077
field_decl 3121989
var_decl 323843
const_decl 2817588
parm_decl 5244428
type_decl 4906573
result_decl 1225435
constructor 369886
pointer_plus_expr 302600
nop_expr 3307128
addr_expr 4592681
tree_binfo 2063753
Honza