< prev index next >

src/share/vm/gc/g1/g1Allocator.cpp

Print this page
rev 12504 : 8171235: Move archive object code from G1MarkSweep into G1ArchiveAllocator
Reviewed-by:

*** 25,35 **** #include "precompiled.hpp" #include "gc/g1/g1Allocator.inline.hpp" #include "gc/g1/g1AllocRegion.inline.hpp" #include "gc/g1/g1EvacStats.inline.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" - #include "gc/g1/g1MarkSweep.hpp" #include "gc/g1/heapRegion.inline.hpp" #include "gc/g1/heapRegionSet.inline.hpp" G1DefaultAllocator::G1DefaultAllocator(G1CollectedHeap* heap) : G1Allocator(heap), --- 25,34 ----
*** 331,345 **** undo_wasted += buf->undo_waste(); } } } G1ArchiveAllocator* G1ArchiveAllocator::create_allocator(G1CollectedHeap* g1h) { // Create the archive allocator, and also enable archive object checking // in mark-sweep, since we will be creating archive regions. G1ArchiveAllocator* result = new G1ArchiveAllocator(g1h); ! G1MarkSweep::enable_archive_object_check(); return result; } bool G1ArchiveAllocator::alloc_new_region() { // Allocate the highest free region in the reserved heap, --- 330,347 ---- undo_wasted += buf->undo_waste(); } } } + bool G1ArchiveAllocator::_archive_check_enabled = false; + G1ArchiveRegionMap G1ArchiveAllocator::_archive_region_map; + G1ArchiveAllocator* G1ArchiveAllocator::create_allocator(G1CollectedHeap* g1h) { // Create the archive allocator, and also enable archive object checking // in mark-sweep, since we will be creating archive regions. G1ArchiveAllocator* result = new G1ArchiveAllocator(g1h); ! enable_archive_object_check(); return result; } bool G1ArchiveAllocator::alloc_new_region() { // Allocate the highest free region in the reserved heap,
*** 360,370 **** // min_region_size'd chunk of the allocated G1 region. _bottom = hr->bottom(); _max = _bottom + HeapRegion::min_region_size_in_words(); // Tell mark-sweep that objects in this region are not to be marked. ! G1MarkSweep::set_range_archive(MemRegion(_bottom, HeapRegion::GrainWords), true); // Since we've modified the old set, call update_sizes. _g1h->g1mm()->update_sizes(); return true; } --- 362,372 ---- // min_region_size'd chunk of the allocated G1 region. _bottom = hr->bottom(); _max = _bottom + HeapRegion::min_region_size_in_words(); // Tell mark-sweep that objects in this region are not to be marked. ! set_range_archive(MemRegion(_bottom, HeapRegion::GrainWords), true); // Since we've modified the old set, call update_sizes. _g1h->g1mm()->update_sizes(); return true; }
< prev index next >