< prev index next >
src/hotspot/share/gc/g1/g1CollectionSetChooser.cpp
Print this page
rev 53416 : imported patch 8217330-split-collectionsetchooser
rev 53417 : [mq]: 8217330-leo-review
rev 53418 : imported patch 8217328-rename-collectionsetchooser
@@ -21,12 +21,12 @@
* questions.
*
*/
#include "precompiled.hpp"
-#include "gc/g1/collectionSetChooser.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1CollectionSetChooser.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "gc/shared/space.inline.hpp"
#include "runtime/atomic.hpp"
#include "utilities/quickSort.hpp"
@@ -168,11 +168,11 @@
_regions_added++;
_reclaimable_bytes_added += hr->reclaimable_bytes();
}
- bool should_add(HeapRegion* hr) { return CollectionSetChooser::should_add(hr); }
+ bool should_add(HeapRegion* hr) { return G1CollectionSetChooser::should_add(hr); }
public:
G1BuildCandidateRegionsClosure(G1BuildCandidateArray* array) :
_array(array),
_cur_chunk_idx(0),
@@ -242,23 +242,23 @@
_num_regions_added,
_reclaimable_bytes_added);
}
};
-uint CollectionSetChooser::calculate_work_chunk_size(uint num_workers, uint num_regions) {
+uint G1CollectionSetChooser::calculate_work_chunk_size(uint num_workers, uint num_regions) {
assert(num_workers > 0, "Active gc workers should be greater than 0");
return MAX2(num_regions / num_workers, 1U);
}
-bool CollectionSetChooser::should_add(HeapRegion* hr) {
+bool G1CollectionSetChooser::should_add(HeapRegion* hr) {
return !hr->is_young() &&
!hr->is_pinned() &&
region_occupancy_low_enough_for_evac(hr->live_bytes()) &&
hr->rem_set()->is_complete();
}
-G1CollectionSetCandidates* CollectionSetChooser::build(WorkGang* workers, uint max_num_regions) {
+G1CollectionSetCandidates* G1CollectionSetChooser::build(WorkGang* workers, uint max_num_regions) {
uint num_workers = workers->active_workers();
uint chunk_size = calculate_work_chunk_size(num_workers, max_num_regions);
G1BuildCandidateRegionsTask cl(max_num_regions, chunk_size, num_workers);
workers->run_task(&cl, num_workers);
< prev index next >