I see explicit gc invocations in our gc-log (see below). I am able to remove invocations with -XX:+DisableExplicitGC but I really want to know which code/library is calling System.gc()?
Any hints on how to track it down?
2011-05-30T12:21:48.230+0200: 1.672: [Full GC (System) 1.672: [CMS: 0K->2227K(2868864K), 0.0862299 secs] 62069K->2227K(3118080K), [CMS Perm : 12899K->12893K(409600K)], 0.0863197 secs] [Times: user=0.06 sys=0.03, real=0.09 secs]
I created a custom version of the System class which writes to a file a stack trace whenever System.gc() is called. This will allow you to trace all the places it is called.
This will find calls anywhere in the system including the JDK.
One place you get calls to System.gc() is in the RMI module to help find discarded remote objects. You can decrease how often it will call a full GC with