Howto: Profiling GCJ code?
Andrew Haley
aph@redhat.com
Tue Jun 30 18:46:00 GMT 2009
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.
More information about the Java
mailing list