This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, MELT] fix useless forcing of GCC garbage collector


On Mon, 9 May 2011 19:03:54 +0200
Basile Starynkevitch <basile@starynkevitch.net> wrote:
> I applied the patch. The gcc/ChangeLog.MELT proposed by Pierre was
> wrong, I wrote:
> 
> 2011-05-09  Pierre Vittet  <piervit@pvittet.com>
> 
> 	* 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

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.  */

with the following gcc/ChangeLog.MELT entry
2011-05-09  Basile Starynkevitch  <basile@starynkevitch.net>

	* melt-runtime.c (ggc_force_collect): Remove extern declaration.
	(melt_garbcoll): Update comment.

Cheers.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]