mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8008966: NPG: Inefficient Metaspace counter functions cause large young GC regressions
Reviewed-by: mgerdin, coleenp
This commit is contained in:
parent
eafc00bc25
commit
d72b516201
12 changed files with 398 additions and 175 deletions
|
@ -225,7 +225,10 @@ void VM_CollectForMetadataAllocation::doit() {
|
|||
gclog_or_tty->print_cr("\nCMS full GC for Metaspace");
|
||||
}
|
||||
heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold);
|
||||
_result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
|
||||
// After a GC try to allocate without expanding. Could fail
|
||||
// and expansion will be tried below.
|
||||
_result =
|
||||
_loader_data->metaspace_non_null()->allocate(_size, _mdtype);
|
||||
}
|
||||
if (_result == NULL && !UseConcMarkSweepGC /* CMS already tried */) {
|
||||
// If still failing, allow the Metaspace to expand.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue