< prev index next >

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

Print this page
rev 10475 : 8151808: Factor G1 heap sizing code out of the G1CollectorPolicy
Reviewed-by:

*** 37,46 **** --- 37,47 ---- #include "gc/g1/g1CollectionSet.hpp" #include "gc/g1/g1CollectorPolicy.hpp" #include "gc/g1/g1CollectorState.hpp" #include "gc/g1/g1EvacStats.inline.hpp" #include "gc/g1/g1GCPhaseTimes.hpp" + #include "gc/g1/g1HeapSizingPolicy.hpp" #include "gc/g1/g1HeapTransition.hpp" #include "gc/g1/g1HeapVerifier.hpp" #include "gc/g1/g1MarkSweep.hpp" #include "gc/g1/g1OopClosures.inline.hpp" #include "gc/g1/g1ParScanThreadState.inline.hpp"
*** 1782,1791 **** --- 1783,1795 ---- /* are_ConcurrentGC_threads */false); _workers->initialize_workers(); _verifier = new G1HeapVerifier(this); _allocator = G1Allocator::create_allocator(this); + + _heap_sizing_policy = G1HeapSizingPolicy::create(this, _g1_policy->measurements()); + _humongous_object_threshold_in_words = humongous_threshold_for(HeapRegion::GrainWords); // Override the default _filler_array_max_size so that no humongous filler // objects are created. _filler_array_max_size = _humongous_object_threshold_in_words;
*** 3437,3447 **** allocate_dummy_regions(); _allocator->init_mutator_alloc_region(); { ! size_t expand_bytes = g1_policy()->expansion_amount(); if (expand_bytes > 0) { size_t bytes_before = capacity(); // No need for an ergo logging here, // expansion_amount() does this when it returns a value > 0. double expand_ms; --- 3441,3451 ---- allocate_dummy_regions(); _allocator->init_mutator_alloc_region(); { ! size_t expand_bytes = _heap_sizing_policy->expansion_amount(); if (expand_bytes > 0) { size_t bytes_before = capacity(); // No need for an ergo logging here, // expansion_amount() does this when it returns a value > 0. double expand_ms;
< prev index next >