public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Rogers <ian.rogers@manchester.ac.uk>
To: Bryce McKinlay <bmckinlay@gmail.com>
Cc: "Patrick Schäfer" <ps@ekse.de>, java@gcc.gnu.org
Subject: Re: Howto: Profiling GCJ code?
Date: Mon, 22 Jun 2009 13:35:00 -0000	[thread overview]
Message-ID: <b1e4cffb0906220635j7d58a746pd9af2dfcaaf059ce@mail.gmail.com> (raw)
In-Reply-To: <7230133d0906190247s60d1565ew109d48c01a4934ea@mail.gmail.com>

Hi,

I just wanted to add a note that to improve the nio performance for
the DaCapo benchmark suite certain special cases were optimized in
Jikes RVM's usage of VMChannel from Classpath (LGPL source visible at
[1]). The FileSystem object within JikesRVM just provides a means to
access open/close/read/write calls without the overhead of JNI (in
much the same way as CNI does for GCJ). There exists CNI channel code,
if nio is a performance problem I believe something can be learnt from
the RVM code base as I don't believe NIO is a performance issue in the
RVM any more.

Regards,
Ian

[1] http://git.codehaus.org/gitweb.cgi?p=mrp.git;a=blob;f=libraryInterface/GNUClasspath/LGPL/src/gnu/java/nio/VMChannel.java;h=8edf32bbf1d630c34b8db317c25376ba85e2a930;hb=HEAD
--
Metacircular Research Platform ( http://mrp.codehaus.org/ ), supports
the development of optimized metacircular Virtual Machines in Java on
Linux, OS/X and Windows.

2009/6/19 Bryce McKinlay <bmckinlay@gmail.com>:
> The tool of choice for libgcj profiling is oprofile:
> http://oprofile.sourceforge.net/
>
> This should give you reasonably accurate, low-overhead profiling
> without having to recompile anything, and even a call graph though
> both the java and C/C++ code.
>
> It doesn't surprise me that libgcj's java.nio is slow. Hotspot VMs can
> also optimize nio code in ways that gcj can't.
>
> Bryce
>
>
> On Fri, Jun 19, 2009 at 9:52 AM, Patrick Schäfer<ps@ekse.de> wrote:
>> 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
>>
>

  reply	other threads:[~2009-06-22 13:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19  8:52 Patrick Schäfer
2009-06-19  9:47 ` Bryce McKinlay
2009-06-22 13:35   ` Ian Rogers [this message]
2009-06-22 19:25     ` Patrick Schäfer
2009-06-22 22:50       ` Bryce McKinlay
2009-06-22 22:53         ` Andrew Pinski
2009-06-26 13:15           ` Patrick Schäfer
2009-06-29  4:54             ` Boehm, Hans
2009-06-30 18:21               ` Patrick Schäfer
2009-06-30 18:38           ` Patrick Schäfer
2009-06-30 18:46             ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1e4cffb0906220635j7d58a746pd9af2dfcaaf059ce@mail.gmail.com \
    --to=ian.rogers@manchester.ac.uk \
    --cc=bmckinlay@gmail.com \
    --cc=java@gcc.gnu.org \
    --cc=ps@ekse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).