diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index 6c70eedca67d7..ae830f83ec913 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -1026,7 +1026,6 @@ void G1CollectedHeap::prepare_for_mutator_after_full_collection() { rebuild_code_roots(); start_new_collection_set(); - allocate_dummy_regions(); _allocator->init_mutator_alloc_regions(); // Post collection state updates. @@ -1865,32 +1864,6 @@ bool G1CollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) { } } -#ifndef PRODUCT -void G1CollectedHeap::allocate_dummy_regions() { - // Let's fill up most of the region - size_t word_size = HeapRegion::GrainWords - 1024; - // And as a result the region we'll allocate will be humongous. - guarantee(is_humongous(word_size), "sanity"); - - // _filler_array_max_size is set to humongous object threshold - // but temporarily change it to use CollectedHeap::fill_with_object(). - AutoModifyRestore<size_t> temporarily(_filler_array_max_size, word_size); - - for (uintx i = 0; i < G1DummyRegionsPerGC; ++i) { - // Let's use the existing mechanism for the allocation - HeapWord* dummy_obj = humongous_obj_allocate(word_size); - if (dummy_obj != NULL) { - MemRegion mr(dummy_obj, word_size); - CollectedHeap::fill_with_object(mr); - } else { - // If we can't allocate once, we probably cannot allocate - // again. Let's get out of the loop. - break; - } - } -} -#endif // !PRODUCT - void G1CollectedHeap::increment_old_marking_cycles_started() { assert(_old_marking_cycles_started == _old_marking_cycles_completed || _old_marking_cycles_started == _old_marking_cycles_completed + 1, @@ -2768,7 +2741,6 @@ void G1CollectedHeap::prepare_for_mutator_after_young_collection() { // Start a new incremental collection set for the mutator phase. start_new_collection_set(); - allocate_dummy_regions(); _allocator->init_mutator_alloc_regions(); phase_times()->record_prepare_for_mutator_time_ms((Ticks::now() - start).seconds() * 1000.0); diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp index 3636f610306e3..94e2e8b96c97c 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp @@ -300,14 +300,6 @@ class G1CollectedHeap : public CollectedHeap { // concurrent cycles) we have completed. volatile uint _old_marking_cycles_completed; - // This is a non-product method that is helpful for testing. It is - // called at the end of a GC and artificially expands the heap by - // allocating a number of dead regions. This way we can induce very - // frequent marking cycles and stress the cleanup / concurrent - // cleanup code more (as all the regions that will be allocated by - // this method will be found dead by the marking cycle). - void allocate_dummy_regions() PRODUCT_RETURN; - // Create a memory mapper for auxiliary data structures of the given size and // translation factor. static G1RegionToSpaceMapper* create_aux_memory_mapper(const char* description, diff --git a/src/hotspot/share/gc/g1/g1_globals.hpp b/src/hotspot/share/gc/g1/g1_globals.hpp index f9cb6e69e6c6f..e86f9e2d17ec1 100644 --- a/src/hotspot/share/gc/g1/g1_globals.hpp +++ b/src/hotspot/share/gc/g1/g1_globals.hpp @@ -244,11 +244,6 @@ develop(bool, G1VerifyCTCleanup, false, \ "Verify card table cleanup.") \ \ - develop(uintx, G1DummyRegionsPerGC, 0, \ - "The number of dummy regions G1 will allocate at the end of " \ - "each evacuation pause in order to artificially fill up the " \ - "heap and stress the marking implementation.") \ - \ develop(bool, G1ExitOnExpansionFailure, false, \ "Raise a fatal VM exit out of memory failure in the event " \ " that heap expansion fails due to running out of swap.") \