8218680: G1 crashes during calculation of old collection set candidates
authortschatzl
Tue, 12 Feb 2019 09:58:27 +0100
changeset 53725 43854454a7db
parent 53724 70f114974aa7
child 53726 5ef581e59d91
8218680: G1 crashes during calculation of old collection set candidates Summary: Parameters were passed in the wrong order to some helper class. Reviewed-by: shade, kbarrett, lkorinth
src/hotspot/share/gc/g1/g1CollectionSetChooser.cpp
--- a/src/hotspot/share/gc/g1/g1CollectionSetChooser.cpp	Tue Feb 12 09:00:04 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectionSetChooser.cpp	Tue Feb 12 09:58:27 2019 +0100
@@ -87,7 +87,7 @@
     uint volatile _cur_claim_idx;
 
     // Calculates the maximum array size that will be used.
-    static uint required_array_size(uint num_regions, uint num_workers, uint chunk_size) {
+    static uint required_array_size(uint num_regions, uint chunk_size, uint num_workers) {
       uint const max_waste = num_workers * chunk_size;
       // The array should be aligned with respect to chunk_size.
       uint const aligned_num_regions = ((num_regions + chunk_size - 1) / chunk_size) * chunk_size;
@@ -96,8 +96,8 @@
     }
 
   public:
-    G1BuildCandidateArray(uint max_num_regions, uint num_workers, uint chunk_size) :
-      _max_size(required_array_size(max_num_regions, num_workers, chunk_size)),
+    G1BuildCandidateArray(uint max_num_regions, uint chunk_size, uint num_workers) :
+      _max_size(required_array_size(max_num_regions, chunk_size, num_workers)),
       _chunk_size(chunk_size),
       _data(NEW_C_HEAP_ARRAY(HeapRegion*, _max_size, mtGC)),
       _cur_claim_idx(0) {