spurious reportings of System.gc()???
Per Liden
per.liden at oracle.com
Fri Apr 4 10:28:38 UTC 2014
Hi,
On 04/04/2014 09:56 AM, Kirk Pepperdine wrote:
> Hi all,
>
> I’ve been puzzling over this….
>
> 0.925: [GC (System.gc())
> Desired Survivor size 11010048 bytes, new threshold 7 (max 15)
> [PSYoungGen: 19838->4025K(76800K)] 19838K->4097K(251392K), 0.0047450 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]
>
> Aside from 3 cases of Allocation Failure, System.gc() is the only cause that is ever printed for every other GC record. Am I to assume this is a bug as my understanding is that this cause is only suppose to be printed when the application or RMI triggers a collection.
There are at least two uses of System.gc() inside the JDK itself. The
first case is heavy use of ByteBuffer.allocateDirect(), which could
cause a System.gc() if reference processing isn't keeping up and you're
bumping into the MaxDirectMemorySize limit. I think the other case is
heavy use of FileChannel.transferFrom/To(). Maybe that's what you're seeing?
cheer,
/Per
>
> Regards,
> Kirk
>
> PS apologies for not providing JVM version, I’m not sure what it is at the moment but I’m assuming 7 but it might be from a preview version of 8.
>
More information about the hotspot-dev
mailing list