From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26999 invoked by alias); 19 Jun 2009 08:52:20 -0000 Received: (qmail 26989 invoked by uid 22791); 19 Jun 2009 08:52:20 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_20 X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Jun 2009 08:52:13 +0000 X-RZG-AUTH: :PH8kcEu7frH/iS35MfCwlb7f0DWuyUPE2aUoqiakvQ8uxjGENg== X-RZG-CLASS-ID: mo00 Received: from [10.0.1.199] (e178192186.adsl.alicedsl.de [85.178.192.186]) by post.strato.de (mrclete mo48) (RZmta 18.42) with AES128-SHA encrypted ESMTP id R01aa4l5J8XXn9 for ; Fri, 19 Jun 2009 10:52:10 +0200 (MEST) Message-Id: <89D1A14F-5454-4E48-8F99-8EAD9C2066A1@ekse.de> From: =?ISO-8859-1?Q?Patrick_Sch=E4fer?= To: java@gcc.gnu.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Howto: Profiling GCJ code? Date: Fri, 19 Jun 2009 08:52:00 -0000 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/msg00045.txt.bz2 Hi, I am trying to run a server based on apache mina (java.nio) and jna for native library access. The program runs just fine under jdk 1.5. But there is a massive performance breakdown using gcj. The program basically polls a Posix Message Queue every 500ms using JNA (JNI). This causes 5% cpu load on jdk but the load goes up to 100% using gcj. Is there any profiling tool which can be easily installed and applied to the native code? I read about profiling gcj applications on your faq. There are 3 tools mentioned. To my understanding gprof can't be applied due to missing multithreading support and it requires the program to exit main before writing any profiling information. The later is not easy when using a network server. cprof seems to be quite outdated (there has been no realease within the last years) and trying to "make" it, fails with several errors. I don't know about sprof, but I couldn't find much information about it on the internet. Thank you for any hints about current multithreading gcj (gcc) profilers Patrick