23 */ |
23 */ |
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 "gc_implementation/g1/heapRegionSet.hpp" |
29 #include "gc_implementation/g1/heapRegionSet.hpp" |
29 #include "gc_implementation/shared/gcId.hpp" |
30 #include "gc_implementation/shared/gcId.hpp" |
30 #include "utilities/taskqueue.hpp" |
31 #include "utilities/taskqueue.hpp" |
31 |
32 |
32 class G1CollectedHeap; |
33 class G1CollectedHeap; |
84 inline bool iterate(BitMapClosure* cl); |
85 inline bool iterate(BitMapClosure* cl); |
85 |
86 |
86 // Return the address corresponding to the next marked bit at or after |
87 // Return the address corresponding to the next marked bit at or after |
87 // "addr", and before "limit", if "limit" is non-NULL. If there is no |
88 // "addr", and before "limit", if "limit" is non-NULL. If there is no |
88 // such bit, returns "limit" if that is non-NULL, or else "endWord()". |
89 // such bit, returns "limit" if that is non-NULL, or else "endWord()". |
89 HeapWord* getNextMarkedWordAddress(HeapWord* addr, |
90 HeapWord* getNextMarkedWordAddress(const HeapWord* addr, |
90 HeapWord* limit = NULL) const; |
91 const HeapWord* limit = NULL) const; |
91 // Return the address corresponding to the next unmarked bit at or after |
92 // Return the address corresponding to the next unmarked bit at or after |
92 // "addr", and before "limit", if "limit" is non-NULL. If there is no |
93 // "addr", and before "limit", if "limit" is non-NULL. If there is no |
93 // such bit, returns "limit" if that is non-NULL, or else "endWord()". |
94 // such bit, returns "limit" if that is non-NULL, or else "endWord()". |
94 HeapWord* getNextUnmarkedWordAddress(HeapWord* addr, |
95 HeapWord* getNextUnmarkedWordAddress(const HeapWord* addr, |
95 HeapWord* limit = NULL) const; |
96 const HeapWord* limit = NULL) const; |
96 |
97 |
97 // conversion utilities |
98 // conversion utilities |
98 HeapWord* offsetToHeapWord(size_t offset) const { |
99 HeapWord* offsetToHeapWord(size_t offset) const { |
99 return _bmStartWord + (offset << _shifter); |
100 return _bmStartWord + (offset << _shifter); |
100 } |
101 } |
101 size_t heapWordToOffset(HeapWord* addr) const { |
102 size_t heapWordToOffset(const HeapWord* addr) const { |
102 return pointer_delta(addr, _bmStartWord) >> _shifter; |
103 return pointer_delta(addr, _bmStartWord) >> _shifter; |
103 } |
104 } |
104 int heapWordDiffToOffsetDiff(size_t diff) const; |
105 int heapWordDiffToOffsetDiff(size_t diff) const; |
105 |
106 |
106 // The argument addr should be the start address of a valid object |
107 // The argument addr should be the start address of a valid object |
474 FlexibleWorkGang* _parallel_workers; |
475 FlexibleWorkGang* _parallel_workers; |
475 |
476 |
476 ForceOverflowSettings _force_overflow_conc; |
477 ForceOverflowSettings _force_overflow_conc; |
477 ForceOverflowSettings _force_overflow_stw; |
478 ForceOverflowSettings _force_overflow_stw; |
478 |
479 |
|
480 void weakRefsWorkParallelPart(BoolObjectClosure* is_alive, bool purged_classes); |
479 void weakRefsWork(bool clear_all_soft_refs); |
481 void weakRefsWork(bool clear_all_soft_refs); |
480 |
482 |
481 void swapMarkBitMaps(); |
483 void swapMarkBitMaps(); |
482 |
484 |
483 // It resets the global marking data structures, as well as the |
485 // It resets the global marking data structures, as well as the |