From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13159 invoked by alias); 3 Apr 2011 17:15:24 -0000 Received: (qmail 13151 invoked by uid 22791); 3 Apr 2011 17:15:23 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 03 Apr 2011 17:15:18 +0000 Received: by vws2 with SMTP id 2so4588105vws.20 for ; Sun, 03 Apr 2011 10:15:18 -0700 (PDT) Received: by 10.52.166.225 with SMTP id zj1mr3854813vdb.162.1301850916176; Sun, 03 Apr 2011 10:15:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.167.34 with HTTP; Sun, 3 Apr 2011 10:14:36 -0700 (PDT) In-Reply-To: References: <4D95909E.4060309@redhat.com> <4D959C24.8030408@redhat.com> <238A96A773B3934685A7269CC8A8D04272EFEFD5C3@GVW0436EXB.americas.hpqcorp.net> From: Erik Groeneveld Date: Sun, 03 Apr 2011 17:15:00 -0000 Message-ID: Subject: Re: GC leaks debugging To: "Boehm, Hans" Cc: Andrew Haley , "java@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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/msg00015.txt.bz2 On Sat, Apr 2, 2011 at 11:38 AM, Erik Groeneveld wrote: > >> Note that in the information you posted, the GC was scanning around 7.5M= B of roots conservatively. =C2=A0It might be worth checking what those regi= ons are. > It seems it come from libgcj. =C2=A0This is now my minimal program: > > #include > void _Jv_RunGC(void); > int main(int argc, char *argv[]) { > =C2=A0 =C2=A0JvCreateJavaVM(NULL); > =C2=A0 =C2=A0_Jv_RunGC(); > =C2=A0 =C2=A0//JvAttachCurrentThread(NULL, NULL); > } With GC_DUMP_REGULARLY it logs an empty heap just before JvCreateJavaVM and right after it: ***Static roots: =46rom 0x8049bdc to 0x8049d34 (temporary) =46rom 0xb714c000 to 0xb787dcdc (temporary) Total size: 7544372 Using gc-analyse's memory map, I find the first root to be in this block of 4 kB. Probably my own data segment or stack: 8049000-804a000 -> .../minimal/test offset 0 The second root spans the next block of 6792 kB and most of the following block of 584 kB: b714c000-b77ee000 -> .../gccinstall-def/lib/libgcj.so.12.0.0 offset 1b3a000 b77ee000-b7880000 -> TestDump001.bytes offset b0009c The heap itself is only 368 kB and contains lots of static strings, classes etc. Nothing special AFAICS. So I am now off into JvCreateJavaVM, if you have any thoughts, please let me know. Erik