From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 937 invoked by alias); 12 Oct 2006 08:20:30 -0000 Received: (qmail 895 invoked by uid 48); 12 Oct 2006 08:20:21 -0000 Date: Thu, 12 Oct 2006 08:20:00 -0000 Message-ID: <20061012082021.894.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/29433] using boost::MPL requires lots of memory In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00997.txt.bz2 List-Id: ------- Comment #6 from rguenth at gcc dot gnu dot org 2006-10-12 08:20 ------- Execution times (seconds) garbage collection : 0.88 ( 1%) usr 0.00 ( 0%) sys 0.87 ( 1%) wall 0 kB ( 0%) ggc preprocessing : 0.10 ( 0%) usr 0.04 ( 1%) sys 0.22 ( 0%) wall 796 kB ( 0%) ggc parser : 17.90 (14%) usr 0.77 (15%) sys 19.39 (15%) wall 325217 kB (64%) ggc name lookup : 94.51 (76%) usr 4.25 (84%) sys 98.43 (75%) wall 175474 kB (34%) ggc tree gimplify : 0.07 ( 0%) usr 0.00 ( 0%) sys 0.04 ( 0%) wall 2548 kB ( 1%) ggc varconst : 11.33 ( 9%) usr 0.01 ( 0%) sys 11.33 ( 9%) wall 2833 kB ( 1%) ggc symout : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall 32 kB ( 0%) ggc TOTAL : 124.80 5.08 130.45 508745 kB and using peak 1.7GB ram (x86_64 with -m32) on the trunk. I guess we're just not collecting garbage during parsing at all. Note that I get errors from compiling the testcase though: [... very large template ...] test_basic_metafunctions.hpp:176: instantiated from here ../src/sd/../static_component.hpp:91: error: 'process_outputs' is not a member of 'mpl_::void_' (4.1 also isn't happy with the testcase) Can you by any chance provide a testcase that compiles ok with at least gcc 4.1.x? (even better mainline...) Thanks! Profiling the bugger yields: Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls Ks/call Ks/call name 12.44 178.30 178.30 121375686 0.00 0.00 comptypes 9.29 311.48 133.18 218375227 0.00 0.00 dump_aggr_type 8.69 436.02 124.54 155559998 0.00 0.00 comp_template_args 8.59 559.19 123.17 620924334 0.00 0.00 pp_base_append_text 7.85 671.72 112.53 1278486 0.00 0.00 retrieve_specialization 6.92 770.99 99.27 173585104 0.00 0.00 template_args_equal 6.54 864.80 93.81 462049326 0.00 0.00 pp_base_character 5.05 937.24 72.44 67358 0.00 0.00 ht_lookup 3.32 984.79 47.55 620924334 0.00 0.00 pp_base_string 3.13 1029.71 44.92 186232097 0.00 0.00 dump_decl 2.58 1066.65 36.95 218532269 0.00 0.00 pp_c_type_qualifier_list 2.36 1100.46 33.81 16289532 0.00 0.00 dump_template_parms 2.32 1133.71 33.25 404449103 0.00 0.00 dump_scope 2.28 1166.40 32.69 218677178 0.00 0.00 dump_type 1.95 1194.40 28.00 404642903 0.00 0.00 pp_c_identifier 1.78 1219.92 25.53 218375227 0.00 0.00 class_key_or_enum_as_string 1.38 1239.65 19.73 216176146 0.00 0.00 dump_template_argument 1.03 1254.37 14.72 3919144 0.00 0.00 purpose_member 0.88 1266.94 12.57 108004962 0.00 0.00 pp_base_last_position_in_text 0.68 1276.74 9.80 162182109 0.00 0.00 pp_cxx_separate_with 0.61 1285.53 8.80 202214181 0.00 0.00 pp_cxx_colon_colon 0.41 1291.38 5.85 54002002 0.00 0.00 pp_cxx_end_template_argument_list 0.41 1297.19 5.81 5800051 0.00 0.00 ggc_alloc_stat 0.40 1302.92 5.73 4113746 0.00 0.00 tsubst 0.37 1308.20 5.29 54002002 0.00 0.00 pp_cxx_begin_template_argument_list 0.31 1312.58 4.38 301296 0.00 0.00 pp_base_emit_prefix 0.30 1316.88 4.30 450268 0.00 0.00 gt_ggc_mx_lang_tree_node 0.27 1320.81 3.93 302601 0.00 0.00 reinit_cxx_pp 0.27 1324.73 3.92 6289194 0.00 0.00 ggc_set_mark 0.26 1328.46 3.73 21 0.00 0.00 pp_base_newline 0.25 1332.04 3.59 892391 0.00 0.00 lookup_template_class 0.24 1335.43 3.39 14090587 0.00 0.00 pp_c_constant 0.20 1338.34 2.91 67465 0.00 0.00 push_to_top_level 0.20 1341.19 2.85 2159736 0.00 0.00 dfs_walk_all 0.17 1343.61 2.43 935808 0.00 0.00 coerce_template_parms 0.17 1346.03 2.42 1554163 0.00 0.00 lookup_field_1 0.16 1348.27 2.24 10344444 0.00 0.00 cp_tree_equal 0.15 1350.49 2.22 222604 0.00 0.00 ht_lookup_with_hash -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29433