Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory consumption with JNI




On Jul 6, 2006, at 12:47 AM, Thomas Kübler wrote:

Hello,

Has anybody experience how i can messure the memory usage from JNI
Lib's inside websphere ?


One possible approach might be to look at the demo source Sun provides for the hprof tool.
I'm not remembering for sure which version I tried it on but I made modifications to that to add some information from getrusage for cpu times and i/o usage. I'm not sure if I did this at 1.3 or 1.4. I don't know what you'd use instead of getrusage for memory.
I am also not immediately seeing where I have to URL for the demo hprof code that I used.
I do notice that even the 1.6 jdk appears to include a java_hprof_demo directory. Whether that demo refers to a complete implementation or only certain hprof profiling features I don't know.
Having any kind of profiling turned on is probably itself going to impact performance which could also be a big concern.
There is always coming up with your own profiling information if you have a command to check it periodically. I'm not sure I've seen anything on how reliable the Runtime memory stuff is on OS X. On the classical Mac VM's it wasn't considered real accurate and I tried extending it with a little native of my own. But you could even just check that periodically from java to see where you are at.


You might consider the jconsole tool as well if you are at 1.5
http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html


What I did with the hprof demo code is at http://www.spacestar.net/ users/mikehall/hprof.jar if of any interest. I don't think I have a link to it or make any mention of it on my pages. My changes didn't add enough new information for what I was testing to make it worth attempting on-going support.


Mike Hall        mikehall at spacestar dot net
http://www.spacestar.net/users/mikehall
http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Memory consumption with JNI (From: Thomas Kübler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.