public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Basile Starynkevitch <basile@starynkevitch.net>
To: Pierre Vittet <piervit@pvittet.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, MELT] fix useless forcing of GCC garbage collector
Date: Mon, 09 May 2011 17:59:00 -0000	[thread overview]
Message-ID: <20110509191058.a84f470d.basile@starynkevitch.net> (raw)
In-Reply-To: <20110509190354.ec3141cc.basile@starynkevitch.net>

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} ***

  reply	other threads:[~2011-05-09 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 16:25 Pierre Vittet
2011-05-09 17:54 ` Basile Starynkevitch
2011-05-09 17:59   ` Basile Starynkevitch [this message]
2011-05-09 21:56   ` Pierre Vittet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110509191058.a84f470d.basile@starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=piervit@pvittet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).