47 * |
47 * |
48 * Parallelization is handled by assigning each GC worker the slice of the heap (the set of regions) |
48 * Parallelization is handled by assigning each GC worker the slice of the heap (the set of regions) |
49 * where it does sliding compaction, without interfering with other threads. |
49 * where it does sliding compaction, without interfering with other threads. |
50 */ |
50 */ |
51 |
51 |
|
52 class PreservedMarksSet; |
|
53 |
52 class ShenandoahMarkCompact : public CHeapObj<mtGC> { |
54 class ShenandoahMarkCompact : public CHeapObj<mtGC> { |
|
55 friend class ShenandoahPrepareForCompactionObjectClosure; |
53 private: |
56 private: |
54 GCTimer* _gc_timer; |
57 GCTimer* _gc_timer; |
55 |
58 |
|
59 PreservedMarksSet* _preserved_marks; |
|
60 |
56 public: |
61 public: |
|
62 ShenandoahMarkCompact(); |
57 void initialize(GCTimer* gc_timer); |
63 void initialize(GCTimer* gc_timer); |
|
64 |
58 void do_it(GCCause::Cause gc_cause); |
65 void do_it(GCCause::Cause gc_cause); |
59 |
66 |
60 private: |
67 private: |
61 void phase1_mark_heap(); |
68 void phase1_mark_heap(); |
62 void phase2_calculate_target_addresses(ShenandoahHeapRegionSet** worker_slices); |
69 void phase2_calculate_target_addresses(ShenandoahHeapRegionSet** worker_slices); |
63 void phase3_update_references(); |
70 void phase3_update_references(); |
64 void phase4_compact_objects(ShenandoahHeapRegionSet** worker_slices); |
71 void phase4_compact_objects(ShenandoahHeapRegionSet** worker_slices); |
65 |
72 |
66 void calculate_target_humongous_objects(); |
73 void calculate_target_humongous_objects(); |
67 void compact_humongous_objects(); |
74 void compact_humongous_objects(); |
68 |
|
69 }; |
75 }; |
70 |
76 |
71 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHMARKCOMPACT_HPP |
77 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHMARKCOMPACT_HPP |