From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13745 invoked by alias); 9 Jun 2009 20:25:47 -0000 Received: (qmail 13732 invoked by uid 22791); 9 Jun 2009 20:25:47 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Jun 2009 20:25:41 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n59KPdVI030899 for ; Tue, 9 Jun 2009 16:25:39 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n59KPctC012418; Tue, 9 Jun 2009 16:25:38 -0400 Received: from opsy.redhat.com (vpn-12-99.rdu.redhat.com [10.11.12.99]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n59KPbOC008864; Tue, 9 Jun 2009 16:25:37 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 6F195486A3; Tue, 9 Jun 2009 14:25:36 -0600 (MDT) To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch 6/8] Types GC [the GC itself] References: <20090525080323.GF13323@host0.dyn.jankratochvil.net> From: Tom Tromey Reply-To: tromey@redhat.com Date: Tue, 09 Jun 2009 20:25:00 -0000 In-Reply-To: <20090525080323.GF13323@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Mon\, 25 May 2009 10\:03\:23 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00242.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> run the mark-and-sweep garbage collector. Just without the next Jan> patch 7/8 there will be crashes as not all the GDB reclaimable Jan> types will be properly being marked. This seems reasonable to me. I have a couple nits though. Jan> +/* A traverse callback for type_group_link_table which removes any Jan> + type_group_link whose reference count is now zero (unused link). */ Why bother with reference counts? Jan> +void Jan> +exp_types_mark_used (struct expression *exp) Jan> +{ Jan> + exp_iterate (exp, exp_types_mark_used_iter, NULL, NULL); Jan> +} This is not called anywhere with this patch. I didn't check later patches yet, so just ignore this if it is called later. Tom