index

src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp

Print this page
rev 7209 : 6979279

*** 82,93 **** static double non_young_other_cost_per_region_ms_defaults[] = { 1.0, 0.7, 0.7, 0.5, 0.5, 0.42, 0.42, 0.30 }; G1CollectorPolicy::G1CollectorPolicy() : ! _parallel_gc_threads(G1CollectedHeap::use_parallel_gc_threads() ! ? ParallelGCThreads : 1), _recent_gc_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), _stop_world_start(0.0), _concurrent_mark_remark_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), --- 82,92 ---- static double non_young_other_cost_per_region_ms_defaults[] = { 1.0, 0.7, 0.7, 0.5, 0.5, 0.42, 0.42, 0.30 }; G1CollectorPolicy::G1CollectorPolicy() : ! _parallel_gc_threads(ParallelGCThreads), _recent_gc_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), _stop_world_start(0.0), _concurrent_mark_remark_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)),
*** 1542,1577 **** ergo_format_reason("concurrent cycle already in progress")); } } } - class KnownGarbageClosure: public HeapRegionClosure { - G1CollectedHeap* _g1h; - CollectionSetChooser* _hrSorted; - - public: - KnownGarbageClosure(CollectionSetChooser* hrSorted) : - _g1h(G1CollectedHeap::heap()), _hrSorted(hrSorted) { } - - bool doHeapRegion(HeapRegion* r) { - // We only include humongous regions in collection - // sets when concurrent mark shows that their contained object is - // unreachable. - - // Do we have any marking information for this region? - if (r->is_marked()) { - // We will skip any region that's currently used as an old GC - // alloc region (we should not consider those for collection - // before we fill them up). - if (_hrSorted->should_add(r) && !_g1h->is_old_gc_alloc_region(r)) { - _hrSorted->add_region(r); - } - } - return false; - } - }; - class ParKnownGarbageHRClosure: public HeapRegionClosure { G1CollectedHeap* _g1h; CSetChooserParUpdater _cset_updater; public: --- 1541,1550 ----
*** 1615,1625 **** void G1CollectorPolicy::record_concurrent_mark_cleanup_end(int no_of_gc_threads) { _collectionSetChooser->clear(); uint region_num = _g1->num_regions(); - if (G1CollectedHeap::use_parallel_gc_threads()) { const uint OverpartitionFactor = 4; uint WorkUnit; // The use of MinChunkSize = 8 in the original code // causes some assertion failures when the total number of // region is less than 8. The code here tries to fix that. --- 1588,1597 ----
*** 1639,1652 **** } _collectionSetChooser->prepare_for_par_region_addition(_g1->num_regions(), WorkUnit); ParKnownGarbageTask parKnownGarbageTask(_collectionSetChooser, WorkUnit, (uint) no_of_gc_threads); _g1->workers()->run_task(&parKnownGarbageTask); - } else { - KnownGarbageClosure knownGarbagecl(_collectionSetChooser); - _g1->heap_region_iterate(&knownGarbagecl); - } _collectionSetChooser->sort_regions(); double end_sec = os::elapsedTime(); double elapsed_time_ms = (end_sec - _mark_cleanup_start_sec) * 1000.0; --- 1611,1620 ----
index