Request for Review (s) - 7012980: PSOldGen is increased if there is no space in Metaspace

Kim Barrett kim.barrett at
Fri May 8 20:26:49 UTC 2015

On May 8, 2015, at 11:58 AM, Jon Masamitsu <jon.masamitsu at> wrote:
> When full collections were being done because the Metaspace threshold was
> reached, the Java heap was being expanded.  Changed the test for expanding
> the Java heap to check that the GCCause was for a full old gen or for adaptive
> size policy which is done in anticipation that a full GC will be needed before
> the next young gen collection.
> This change is done in two parts: the fix for this bug and a cleanup
> to add the GCCause::is_system_gc().  This can be pushed separately
> if desired.
> Stability tested product and debug with gc_test_suite.  Performance tested
> with specjbb2000 and specjbb2005 with and without MetaspaceSize set to
> generate some Metaspace threshold caused full GC's.
> Thanks.
> Jon

webrev.is_system_gc.00 looks good.


  93     assert(cause != GCCause::_old_generation_too_full_to_scavenge &&
  94            cause != GCCause::_old_generation_expanded_on_last_scavenge,
  95     err_msg("This GCCause may be correct but is not expected yet: %s",
  96       to_string(cause)));

The err_msg expression is oddly indented.

Does this mean there is a plan to actually use those two causes?  If
not, then how about removing them, rather than checking for them.
There presently appear to be no real uses of them.


More information about the hotspot-gc-dev mailing list