Bug in G1GC it performs Full GC when code cache is full resulting in overkill

Thomas Schatzl thomas.schatzl at oracle.com
Wed Jun 5 03:05:03 PDT 2013


Hi,

On Wed, 2013-06-05 at 07:26 +0300, Martin Makundi wrote:
> Meanwhile, is there a feature like "Finding which methods allocated
> large objects" for Sun/OpenJDK JAVA?

I am not so proficient with the options to track allocations on the Java
level: there are a few possibilites that come to my mind right away, but
all require some extra effort: using dtrace (on solaris), or byte code
rewriting. Afaik there are also JFR events to track memory allocations.

I think you can also do this using the JVMTI interface, but I don't know
much about it. There are certainly profilers available that use it.

For dtrace/solaris I found some pre-baked script collection that should
give you almost what you want at http://www.gousios.gr/sw/jdt.html , the
jmemstat script. It should be simple to add a threshold for the
printout.
The documentation at
http://docs.oracle.com/javase/6/docs/technotes/guides/vm/dtrace.html
gives an overview about the available probes. Not sure about the current
state of Linux/systemtap support.

Regarding bytecode rewriting, I found
https://code.google.com/p/java-allocation-instrumenter/ which on the
front page already gives an example for almost what you want to achieve.

Likely others can give a more detailed answer about further options.

Hth,
Thomas




More information about the hotspot-gc-use mailing list