From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7496 invoked by alias); 1 Apr 2011 08:45:32 -0000 Received: (qmail 7472 invoked by uid 22791); 1 Apr 2011 08:45:30 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Apr 2011 08:45:22 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p318jK3u018618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Apr 2011 04:45:21 -0400 Received: from zebedee.pink (ovpn-113-109.phx2.redhat.com [10.3.113.109]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p318jJX0016412; Fri, 1 Apr 2011 04:45:20 -0400 Message-ID: <4D95909E.4060309@redhat.com> Date: Fri, 01 Apr 2011 08:45:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: java@gcc.gnu.org Subject: Re: GC leaks debugging References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00001.txt.bz2 On 01/04/11 09:39, Erik Groeneveld wrote: > L.S., > > I am debugging memory leaks in the GC of libgcj. Generally, libgcj > performs well, but there are some cases in which the heap literally > explodes over time. I wish to solve this. The OpenJDK vm runs the same > tests without any leaking. > > I compiled GCC 4.6, build with --enable-libgcj-debug=yes and started > testing with GC_DUMP_REGULARLY=1. From the results I have a few > questions to understand it better. I am still in a phase of > pinpointing a minimal program to demonstrate the problem, and I would > like to get hints as to search further. > > 1. The finalization table entries keeps on increasing up to 39344 > until it is killed, but the objects which are eligible for immediate > finalization remains 0. It seems that no finalization takes place. > Could you give any hints as to what could be the reason for this? It > logs: > > ***Finalization statistics: > 39344 finalization table entries; 48 disappearing links > 0 objects are eligible for immediate finalization > > ***Static roots: > From 0x804b284 to 0x804bf1c (temporary) > From 0xb716d000 to 0xb7854cdc (temporary) > From 0xb55ba92c to 0xb562ddbc (temporary) > Total size: 7716356 > > > 2. There is a fair amount of black-listing. From reading about the > GC, I understand that the GC knows what is a pointer and what not > because there is type information associated with the Java objects. > So I'd expect no black-listing at all. It that a right observation? No. Objects are scanned precisely, but the stack is not. Also, depending on your compilation options, the data segments of your program may be scanned conservatively. Andrew.