Re: Howto: Profiling GCJ code?
Patrick Schäfer <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, 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? Profile: Self Total Library 0.0% 89.9% Unknown Library 0x696d5f74 [unreadable] 0.0% 89.8% libgcj.9.dylib _Jv_platform_dladdr(void*, _Jv_AddrInfo*) 0.0% 89.8% libSystem.B.dylib dladdr 24.2% 82.9% dyld dladdr 28.9% 28.9% dyld ImageLoaderMachO::getSymbolAddress(macho_nlist const*, ImageLoader const*, ImageLoader::LinkContext const&) const 22.8% 22.8% dyld ImageLoaderMachO::getIndexedExportedSymbol(unsigned int) const 6.9% 6.9% dyld ImageLoaderMachO::getExportedSymbolAddress(ImageLoader::Symbol const*, ImageLoader::LinkContext const&, ImageLoader const*) const 0.0% 0.0% dyld dyld::findImageContainingAddress(void const*) 0.0% 0.0% dyld ImageLoader::containsAddress(void const*) const 0.0% 0.0% dyld ImageLoaderMachO::getExportedSymbolName(ImageLoader::Symbol const*) const 0.0% 0.0% dyld ImageLoader::getLogicalPath() const 2.3% 2.3% dyld ImageLoaderMachO::getIndexedExportedSymbol(unsigned int) const 2.3% 2.3% dyld ImageLoaderMachO::getExportedSymbolAddress(ImageLoader::Symbol const*, ImageLoader::LinkContext const&, ImageLoader const*) const 2.2% 2.2% dyld ImageLoaderMachO::getSymbolAddress(macho_nlist const*, ImageLoader const*, ImageLoader::LinkContext const&) const thank you for any help patrick