From patchwork Mon May 9 17:10:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Basile Starynkevitch X-Patchwork-Id: 94828 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 1E9BCB6F35 for ; Tue, 10 May 2011 03:11:17 +1000 (EST) Received: (qmail 22585 invoked by alias); 9 May 2011 17:11:16 -0000 Received: (qmail 22575 invoked by uid 22791); 9 May 2011 17:11:15 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_GC X-Spam-Check-By: sourceware.org Received: from smtp-151-monday.nerim.net (HELO maiev.nerim.net) (194.79.134.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 May 2011 17:11:01 +0000 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by maiev.nerim.net (Postfix) with ESMTPS id 8007B2E00F; Mon, 9 May 2011 19:11:00 +0200 (CEST) Received: from glinka.lesours ([192.168.0.1]) by hector.lesours with smtp (Exim 4.75) (envelope-from ) id 1QJTz1-0007Ao-VT; Mon, 09 May 2011 19:10:59 +0200 Date: Mon, 9 May 2011 19:10:58 +0200 From: Basile Starynkevitch To: Pierre Vittet Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH, MELT] fix useless forcing of GCC garbage collector Message-Id: <20110509191058.a84f470d.basile@starynkevitch.net> In-Reply-To: <20110509190354.ec3141cc.basile@starynkevitch.net> References: <4DC7DAE2.4040201@pvittet.com> <20110509190354.ec3141cc.basile@starynkevitch.net> Mime-Version: 1.0 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 On Mon, 9 May 2011 19:03:54 +0200 Basile Starynkevitch wrote: > I applied the patch. The gcc/ChangeLog.MELT proposed by Pierre was > wrong, I wrote: > > 2011-05-09 Pierre Vittet > > * melt-runtime.c (melt_garbcoll): Don't force collection by > gcc_collect. > > Committed revision 173576. Pierre & me forgot to update the comments, and remove the ggc_force_collect extern declaration. So I added the following patch with the following gcc/ChangeLog.MELT entry 2011-05-09 Basile Starynkevitch * melt-runtime.c (ggc_force_collect): Remove extern declaration. (melt_garbcoll): Update comment. Cheers. Index: gcc/melt-runtime.c =================================================================== --- gcc/melt-runtime.c (revision 173576) +++ gcc/melt-runtime.c (working copy) @@ -82,9 +82,6 @@ along with GCC; see the file COPYING3. If not se /* GCC 4.6 has it: */ #include "gimple-pretty-print.h" -/* Flag ggc_force_collect is defined in ggc-internal.h so is officially not - public. */ -extern bool ggc_force_collect; #endif /*GCC 4.6*/ @@ -1162,8 +1159,8 @@ melt_garbcoll (size_t wanted, enum melt_gckind_en melt_nb_full_garbcoll++; debugeprintf ("melt_garbcoll #%ld fullgarbcoll #%ld", melt_nb_garbcoll, melt_nb_full_garbcoll); - /* force major collection, with our callback */ debugeprintf ("melt_garbcoll calling gcc_collect #%ld", melt_nb_full_garbcoll); + /* There is no need to force a GGC collection. */ ggc_collect (); debugeprintf ("melt_garbcoll after fullgarbcoll #%ld", melt_nb_full_garbcoll); /* Delete the unmarked specials. */