From patchwork Sun Aug 19 18:31:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitrios Apostolou X-Patchwork-Id: 178581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 43C012C0094 for ; Mon, 20 Aug 2012 04:31:55 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346005915; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: User-Agent:MIME-Version:Content-Type:Content-ID:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=LeLctfDwhUvvkHK8T9vzsY454Qw=; b=d5GgxF4b3A1s3rzlykNJDsc+N2qvx/xm3Yz9kFUijlJODM0q2Fx5VqUsLc7k9/ nKFHLt1wQPXVkOaxewY1a0YrOiad+Wls2qAGQkh1Ao+IcDeHS00kRvHjkwz33Fzj Sq4zDTj4sNTSC+tQRSs2o25Arm4rI2qlNu5C9fHSdoEr8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type:Content-ID:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=mf+P2C9hXGxeDlvskOvv2PNEAVqyFafLS8GIgzElKpCOzgt05GjZHeimbzSaPy 1Vx0Kcv8udLPwD77xH6T/QjCe4xrrJCvaSCzBtbiMp+8Ty6yigVIu+MFolKe+gT9 pO21VjtynZmUugcnjUwQB8fP4i+dfQlLQMMuzacXCNloY=; Received: (qmail 11050 invoked by alias); 19 Aug 2012 18:31:34 -0000 Received: (qmail 10921 invoked by uid 22791); 19 Aug 2012 18:31:30 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KHOP_THREADED, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SARE_ADLTSUB2 X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sun, 19 Aug 2012 18:31:12 +0000 Received: (qmail invoked by alias); 19 Aug 2012 18:31:10 -0000 Received: from teras.ics.forth.gr (EHLO teras.ics.forth.gr) [139.91.70.93] by mail.gmx.net (mp034) with SMTP; 19 Aug 2012 20:31:10 +0200 Date: Sun, 19 Aug 2012 21:31:09 +0300 (EEST) From: Dimitrios Apostolou To: gcc-patches@gcc.gnu.org cc: Andrey Belevantsev Subject: enlarge hot allocation pools In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-ID: X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello, 2012-08-19 Dimitrios Apostolou * gcc/cselib.c (cselib_init): Make allocation pools larger since they are too hot and show to expand often on the profiler. * gcc/df-problems.c (df_chain_alloc): Same. * gcc/et-forest.c (et_new_occ, et_new_tree): Same. * gcc/tree-ssa-pre.c (init_pre): Same These allocation pools are the ones that I've noticed calling malloc() too often, for expanding their size. Also I don't like the way the pools are created in et_new_{occ,tree}() but couldn't find a single point to move the initialisation either. Any ideas on this one? Thanks, Dimitris 2012-08-19 Dimitrios Apostolou * gcc/cselib.c (cselib_init): Make allocation pools larger since they are too hot and show to expand often on the profiler. * gcc/df-problems.c (df_chain_alloc): Same. * gcc/et-forest.c (et_new_occ, et_new_tree): Same. * gcc/tree-ssa-pre.c (init_pre): Same === modified file 'gcc/cselib.c' --- gcc/cselib.c 2012-08-02 22:39:57 +0000 +++ gcc/cselib.c 2012-08-19 15:13:28 +0000 @@ -2659,12 +2659,12 @@ void cselib_init (int record_what) { elt_list_pool = create_alloc_pool ("elt_list", - sizeof (struct elt_list), 10); + sizeof (struct elt_list), 128); elt_loc_list_pool = create_alloc_pool ("elt_loc_list", - sizeof (struct elt_loc_list), 10); + sizeof (struct elt_loc_list), 128); cselib_val_pool = create_alloc_pool ("cselib_val_list", - sizeof (cselib_val), 10); - value_pool = create_alloc_pool ("value", RTX_CODE_SIZE (VALUE), 100); + sizeof (cselib_val), 128); + value_pool = create_alloc_pool ("value", RTX_CODE_SIZE (VALUE), 128); cselib_record_memory = record_what & CSELIB_RECORD_MEMORY; cselib_preserve_constants = record_what & CSELIB_PRESERVE_CONSTANTS; cselib_any_perm_equivs = false; === modified file 'gcc/df-problems.c' --- gcc/df-problems.c 2012-08-17 09:42:06 +0000 +++ gcc/df-problems.c 2012-08-19 15:29:37 +0000 @@ -1993,7 +1993,7 @@ df_chain_alloc (bitmap all_blocks ATTRIB { df_chain_remove_problem (); df_chain->block_pool = create_alloc_pool ("df_chain_block pool", - sizeof (struct df_link), 50); + sizeof (struct df_link), 128); df_chain->optional_p = true; } === modified file 'gcc/et-forest.c' --- gcc/et-forest.c 2012-05-31 16:43:31 +0000 +++ gcc/et-forest.c 2012-08-19 15:50:25 +0000 @@ -444,8 +444,8 @@ et_new_occ (struct et_node *node) { struct et_occ *nw; - if (!et_occurrences) - et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300); + if (!et_occurrences) + et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 1024); nw = (struct et_occ *) pool_alloc (et_occurrences); nw->of = node; @@ -467,8 +467,8 @@ et_new_tree (void *data) { struct et_node *nw; - if (!et_nodes) - et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 300); + if (!et_nodes) + et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 512); nw = (struct et_node *) pool_alloc (et_nodes); nw->data = data; === modified file 'gcc/tree-ssa-pre.c' --- gcc/tree-ssa-pre.c 2012-08-18 06:31:26 +0000 +++ gcc/tree-ssa-pre.c 2012-08-19 15:28:21 +0000 @@ -4812,9 +4812,9 @@ init_pre (bool do_fre) phi_translate_table.create (5110); expression_to_id.create (num_ssa_names * 3); bitmap_set_pool = create_alloc_pool ("Bitmap sets", - sizeof (struct bitmap_set), 30); + sizeof (struct bitmap_set), 128); pre_expr_pool = create_alloc_pool ("pre_expr nodes", - sizeof (struct pre_expr_d), 30); + sizeof (struct pre_expr_d), 32); FOR_ALL_BB (bb) { EXP_GEN (bb) = bitmap_set_new ();