< prev index next >

src/share/vm/gc/shared/vmGCOperations.cpp

Print this page

        

*** 27,36 **** --- 27,37 ---- #include "classfile/javaClasses.hpp" #include "gc/shared/gcLocker.inline.hpp" #include "gc/shared/genCollectedHeap.hpp" #include "gc/shared/vmGCOperations.hpp" #include "memory/oopFactory.hpp" + #include "logging/log.hpp" #include "oops/instanceKlass.hpp" #include "oops/instanceRefKlass.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" #include "runtime/interfaceSupport.hpp"
*** 214,233 **** #endif return false; } - static void log_metaspace_alloc_failure_for_concurrent_GC() { - if (Verbose && PrintGCDetails) { - if (UseConcMarkSweepGC) { - gclog_or_tty->print_cr("\nCMS full GC for Metaspace"); - } else if (UseG1GC) { - gclog_or_tty->print_cr("\nG1 full GC for Metaspace"); - } - } - } - void VM_CollectForMetadataAllocation::doit() { SvcGCMarker sgcm(SvcGCMarker::FULL); CollectedHeap* heap = Universe::heap(); GCCauseSetter gccs(heap, _gc_cause); --- 215,224 ----
*** 247,257 **** _result = _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype); if (_result != NULL) { return; } ! log_metaspace_alloc_failure_for_concurrent_GC(); } // Don't clear the soft refs yet. heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold); // After a GC try to allocate without expanding. Could fail --- 238,248 ---- _result = _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype); if (_result != NULL) { return; } ! log_debug(gc)("%s full GC for Metaspace", UseConcMarkSweepGC ? "CMS" : "G1"); } // Don't clear the soft refs yet. heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold); // After a GC try to allocate without expanding. Could fail
*** 280,293 **** _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype); if (_result != NULL) { return; } ! if (Verbose && PrintGCDetails) { ! gclog_or_tty->print_cr("\nAfter Metaspace GC failed to allocate size " ! SIZE_FORMAT, _size); ! } if (GC_locker::is_active_and_needs_gc()) { set_gc_locked(); } } --- 271,281 ---- _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype); if (_result != NULL) { return; } ! log_debug(gc)("After Metaspace GC failed to allocate size " SIZE_FORMAT, _size); if (GC_locker::is_active_and_needs_gc()) { set_gc_locked(); } }
< prev index next >