24 |
24 |
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP |
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP |
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP |
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP |
27 |
27 |
28 #include "classfile/javaClasses.hpp" |
28 #include "classfile/javaClasses.hpp" |
|
29 #include "gc_implementation/g1/g1ConcurrentMarkObjArrayProcessor.hpp" |
29 #include "gc_implementation/g1/heapRegionSet.hpp" |
30 #include "gc_implementation/g1/heapRegionSet.hpp" |
30 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp" |
31 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp" |
31 #include "gc_implementation/shared/gcId.hpp" |
32 #include "gc_implementation/shared/gcId.hpp" |
32 #include "utilities/taskqueue.hpp" |
33 #include "utilities/taskqueue.hpp" |
33 |
34 |
940 // the regular clock call is called once the scanned words reaches |
941 // the regular clock call is called once the scanned words reaches |
941 // this limit |
942 // this limit |
942 words_scanned_period = 12*1024, |
943 words_scanned_period = 12*1024, |
943 // the regular clock call is called once the number of visited |
944 // the regular clock call is called once the number of visited |
944 // references reaches this limit |
945 // references reaches this limit |
945 refs_reached_period = 384, |
946 refs_reached_period = 1024, |
946 // initial value for the hash seed, used in the work stealing code |
947 // initial value for the hash seed, used in the work stealing code |
947 init_hash_seed = 17, |
948 init_hash_seed = 17, |
948 // how many entries will be transferred between global stack and |
949 // how many entries will be transferred between global stack and |
949 // local queues |
950 // local queues |
950 global_stack_transfer_size = 16 |
951 global_stack_transfer_size = 16 |
951 }; |
952 }; |
|
953 |
|
954 G1CMObjArrayProcessor _objArray_processor; |
952 |
955 |
953 uint _worker_id; |
956 uint _worker_id; |
954 G1CollectedHeap* _g1h; |
957 G1CollectedHeap* _g1h; |
955 ConcurrentMark* _cm; |
958 ConcurrentMark* _cm; |
956 CMBitMap* _nextMarkBitMap; |
959 CMBitMap* _nextMarkBitMap; |
1108 bool is_below_finger(oop obj, HeapWord* global_finger) const; |
1111 bool is_below_finger(oop obj, HeapWord* global_finger) const; |
1109 |
1112 |
1110 template<bool scan> void process_grey_object(oop obj); |
1113 template<bool scan> void process_grey_object(oop obj); |
1111 |
1114 |
1112 public: |
1115 public: |
|
1116 // Apply the closure on the given area of the objArray. Return the number of words |
|
1117 // scanned. |
|
1118 inline size_t scan_objArray(objArrayOop obj, MemRegion mr); |
1113 // It resets the task; it should be called right at the beginning of |
1119 // It resets the task; it should be called right at the beginning of |
1114 // a marking phase. |
1120 // a marking phase. |
1115 void reset(CMBitMap* _nextMarkBitMap); |
1121 void reset(CMBitMap* _nextMarkBitMap); |
1116 // it clears all the fields that correspond to a claimed region. |
1122 // it clears all the fields that correspond to a claimed region. |
1117 void clear_region_fields(); |
1123 void clear_region_fields(); |