diff -r 2251ba078bec -r eb7ce841ccec src/share/vm/gc_implementation/g1/concurrentMark.hpp --- a/src/share/vm/gc_implementation/g1/concurrentMark.hpp Sat Oct 24 16:18:50 2020 +0800 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.hpp Sat Oct 24 16:43:47 2020 +0800 @@ -26,6 +26,7 @@ #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP #include "classfile/javaClasses.hpp" +#include "gc_implementation/g1/g1ConcurrentMarkObjArrayProcessor.hpp" #include "gc_implementation/g1/heapRegionSet.hpp" #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp" #include "gc_implementation/shared/gcId.hpp" @@ -942,7 +943,7 @@ words_scanned_period = 12*1024, // the regular clock call is called once the number of visited // references reaches this limit - refs_reached_period = 384, + refs_reached_period = 1024, // initial value for the hash seed, used in the work stealing code init_hash_seed = 17, // how many entries will be transferred between global stack and @@ -950,6 +951,8 @@ global_stack_transfer_size = 16 }; + G1CMObjArrayProcessor _objArray_processor; + uint _worker_id; G1CollectedHeap* _g1h; ConcurrentMark* _cm; @@ -1110,6 +1113,9 @@ template void process_grey_object(oop obj); public: + // Apply the closure on the given area of the objArray. Return the number of words + // scanned. + inline size_t scan_objArray(objArrayOop obj, MemRegion mr); // It resets the task; it should be called right at the beginning of // a marking phase. void reset(CMBitMap* _nextMarkBitMap);