Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/shared/vmGCOperations.cpp @ 6753:8da5e203b993
7197557: NPG: nsk/sysdict/vm/stress/chain/chain004 hangs intermittently
Reviewed-by: johnc, ysr
author | jmasa |
---|---|
date | Tue, 18 Sep 2012 14:15:06 -0700 |
parents | aed758eda82a |
children | 097d78aaf2b5 |
comparison
equal
deleted
inserted
replaced
6752:9646b7ff4d14 | 6753:8da5e203b993 |
---|---|
228 // If still failing, allow the Metaspace to expand. | 228 // If still failing, allow the Metaspace to expand. |
229 // See delta_capacity_until_GC() for explanation of the | 229 // See delta_capacity_until_GC() for explanation of the |
230 // amount of the expansion. | 230 // amount of the expansion. |
231 // This should work unless there really is no more space | 231 // This should work unless there really is no more space |
232 // or a MaxMetaspaceSize has been specified on the command line. | 232 // or a MaxMetaspaceSize has been specified on the command line. |
233 MetaspaceGC::set_expand_after_GC(true); | 233 _result = |
234 size_t before_inc = MetaspaceGC::capacity_until_GC(); | 234 _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype); |
235 size_t delta_words = MetaspaceGC::delta_capacity_until_GC(_size); | 235 |
236 MetaspaceGC::inc_capacity_until_GC(delta_words); | |
237 if (PrintGCDetails && Verbose) { | |
238 gclog_or_tty->print_cr("Increase capacity to GC from " SIZE_FORMAT | |
239 " to " SIZE_FORMAT, before_inc, MetaspaceGC::capacity_until_GC()); | |
240 } | |
241 _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype); | |
242 if (do_cms_concurrent && _result == NULL) { | 236 if (do_cms_concurrent && _result == NULL) { |
243 // Rather than fail with a metaspace out-of-memory, do a full | 237 // Rather than fail with a metaspace out-of-memory, do a full |
244 // GC for CMS. | 238 // GC for CMS. |
245 heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold); | 239 heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold); |
246 _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype); | 240 _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype); |