From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14040 invoked by alias); 30 Jun 2009 18:46:23 -0000 Received: (qmail 14025 invoked by uid 22791); 30 Jun 2009 18:46:21 -0000 X-SWARE-Spam-Status: No, hits=-2.4 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, 30 Jun 2009 18:46:14 +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 n5UIkAnw005858; Tue, 30 Jun 2009 14:46:11 -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 n5UIk6wr023128; Tue, 30 Jun 2009 14:46:07 -0400 Received: from zebedee.pink (vpn-12-61.rdu.redhat.com [10.11.12.61]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5UIk4wh011471; Tue, 30 Jun 2009 14:46:05 -0400 Message-ID: <4A4A5D6C.4000202@redhat.com> Date: Tue, 30 Jun 2009 18:46:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Patrick_Sch=E4fer?= CC: java@gcc.gnu.org Subject: Re: Howto: Profiling GCJ code? References: <89D1A14F-5454-4E48-8F99-8EAD9C2066A1@ekse.de> <7230133d0906190247s60d1565ew109d48c01a4934ea@mail.gmail.com> <7230133d0906221549r56981795sd907a5ea3a18693c@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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: 2009-06/txt/msg00081.txt.bz2 Patrick Schäfer wrote: > I tried exchanging java.nio with the apache portable runtime (APR) > library which solves the issue with the garbage collector consuming most > of the time (>80%) even while being idle. But it causes the application > to spend most cycles in dynamically loading libraries at runtime under > load. I am extensively using JNA (JNI) for Posix Message Queues and APR > as transport layer which both use JNI for native library access. > > It seems to me like those libraries are dynamically loaded for every > method call. I couldn't find a way to statically bind the libraries on > mac os x. Is there a way to cache methods or any other way to improve this? JNI doesn't dynamically load a library for every call, although JNA might. It seems there's a tremendous load on dladdr(). I'll have a look at the sources for JNA and get back to you. Andrew.