hotspot/src/share/vm/gc/g1/g1RemSet.cpp
changeset 35210 eb1d5c68bf64
parent 35198 1365be812a7d
child 35461 1068dcb8d315
--- a/hotspot/src/share/vm/gc/g1/g1RemSet.cpp	Tue Dec 22 00:08:38 2015 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1RemSet.cpp	Tue Dec 22 11:02:04 2015 +0100
@@ -25,9 +25,11 @@
 #include "precompiled.hpp"
 #include "gc/g1/concurrentG1Refine.hpp"
 #include "gc/g1/concurrentG1RefineThread.hpp"
+#include "gc/g1/dirtyCardQueue.hpp"
 #include "gc/g1/g1BlockOffsetTable.inline.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/g1CollectorPolicy.hpp"
+#include "gc/g1/g1FromCardCache.hpp"
 #include "gc/g1/g1GCPhaseTimes.hpp"
 #include "gc/g1/g1HotCardCache.hpp"
 #include "gc/g1/g1OopClosures.inline.hpp"
@@ -76,6 +78,14 @@
   FREE_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, _cset_rs_update_cl);
 }
 
+uint G1RemSet::num_par_rem_sets() {
+  return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
+}
+
+void G1RemSet::initialize(uint max_regions) {
+  G1FromCardCache::initialize(num_par_rem_sets(), max_regions);
+}
+
 ScanRSClosure::ScanRSClosure(G1ParPushHeapRSClosure* oc,
                              CodeBlobClosure* code_root_cl,
                              uint worker_i) :