OK - I know I can run my java process like this :
java -XX:+PrintCompilation <FooProgram>
and I can see output like:
c:\>java -XX:+PrintCompilation -jar c:\FooProgram.jar
1 java.lang.String::charAt (33 bytes)
2 java.lang.Math::max (11 bytes)
1% java.util.jar.JarFile::hasClassPathAttribute @ 78 (197 bytes)
3 java.lang.String::hashCode (60 bytes)
4 java.lang.String::indexOf (151 bytes)
5 java.util.Properties$LineReader::readLine (452 bytes)
6 java.lang.Object::<init> (1 bytes)
7 java.lang.String::indexOf (166 bytes)
8 java.lang.String::equals (88 bytes)
to give me an idea of what methods are compiled, uncompiled, marked as zombies, etc. Is there anyway to monitor the usage of the code cache where these methods get compiled into? I see a message when the compiler code cache is full saying something like: "I'm full, no more compilations for you...", but it would seem as though something like this is a lagging indicator that we have a problem. I know how to print the max size of the code cache, what I'm looking for really is a way to see how its being filled up over time.
Old question but... I'll answer anyways... I have build a VisualVM plugin that will monitor stats about the code cache. It has been included in the open source version plug-in repository. Alternatively you can down load it and the source from java.net.
Oops, forgot link... https://java.net/projects/memorypoolview/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With