< prev index next >

src/hotspot/share/memory/metaspaceShared.cpp

Print this page

        

*** 1910,1932 **** return ao; } int len = obj->size(); if (G1CollectedHeap::heap()->is_archive_alloc_too_large(len)) { return NULL; } int hash = obj->identity_hash(); oop archived_oop = (oop)G1CollectedHeap::heap()->archive_mem_allocate(len); if (archived_oop != NULL) { Copy::aligned_disjoint_words((HeapWord*)obj, (HeapWord*)archived_oop, len); relocate_klass_ptr(archived_oop); ArchivedObjectCache* cache = MetaspaceShared::archive_object_cache(); cache->put(obj, archived_oop); - } log_debug(cds, heap)("Archived heap object " PTR_FORMAT " ==> " PTR_FORMAT, p2i(obj), p2i(archived_oop)); return archived_oop; } oop MetaspaceShared::materialize_archived_object(oop obj) { if (obj != NULL) { --- 1910,1938 ---- return ao; } int len = obj->size(); if (G1CollectedHeap::heap()->is_archive_alloc_too_large(len)) { + log_debug(cds, heap)("Cannot archive, object (" PTR_FORMAT ") is too large: " SIZE_FORMAT, + p2i(obj), (size_t)obj->size()); return NULL; } int hash = obj->identity_hash(); oop archived_oop = (oop)G1CollectedHeap::heap()->archive_mem_allocate(len); if (archived_oop != NULL) { Copy::aligned_disjoint_words((HeapWord*)obj, (HeapWord*)archived_oop, len); relocate_klass_ptr(archived_oop); ArchivedObjectCache* cache = MetaspaceShared::archive_object_cache(); cache->put(obj, archived_oop); log_debug(cds, heap)("Archived heap object " PTR_FORMAT " ==> " PTR_FORMAT, p2i(obj), p2i(archived_oop)); + } else { + tty->print("Cannot allocate space for object " PTR_FORMAT " in archived heap region", + p2i(obj)); + vm_exit(1); + } return archived_oop; } oop MetaspaceShared::materialize_archived_object(oop obj) { if (obj != NULL) {
< prev index next >