708
709 enum CMS_op_type {
710 CMS_op_checkpointRootsInitial,
711 CMS_op_checkpointRootsFinal
712 };
713
714 void do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause);
715 bool stop_world_and_do(CMS_op_type op);
716
717 OopTaskQueueSet* task_queues() { return _task_queues; }
718 int* hash_seed(int i) { return &_hash_seed[i]; }
719 YieldingFlexibleWorkGang* conc_workers() { return _conc_workers; }
720
721 // Support for parallelizing Eden rescan in CMS remark phase
722 void sample_eden(); // ... sample Eden space top
723
724 private:
725 // Support for parallelizing young gen rescan in CMS remark phase
726 ParNewGeneration* _young_gen;
727
728 HeapWord** _top_addr; // ... Top of Eden
729 HeapWord** _end_addr; // ... End of Eden
730 Mutex* _eden_chunk_lock;
731 HeapWord** _eden_chunk_array; // ... Eden partitioning array
732 size_t _eden_chunk_index; // ... top (exclusive) of array
733 size_t _eden_chunk_capacity; // ... max entries in array
734
735 // Support for parallelizing survivor space rescan
736 HeapWord** _survivor_chunk_array;
737 size_t _survivor_chunk_index;
738 size_t _survivor_chunk_capacity;
739 size_t* _cursor;
740 ChunkArray* _survivor_plab_array;
741
742 // Support for marking stack overflow handling
743 bool take_from_overflow_list(size_t num, CMSMarkStack* to_stack);
744 bool par_take_from_overflow_list(size_t num,
745 OopTaskQueue* to_work_q,
746 int no_of_gc_threads);
747 void push_on_overflow_list(oop p);
748 void par_push_on_overflow_list(oop p);
|
708
709 enum CMS_op_type {
710 CMS_op_checkpointRootsInitial,
711 CMS_op_checkpointRootsFinal
712 };
713
714 void do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause);
715 bool stop_world_and_do(CMS_op_type op);
716
717 OopTaskQueueSet* task_queues() { return _task_queues; }
718 int* hash_seed(int i) { return &_hash_seed[i]; }
719 YieldingFlexibleWorkGang* conc_workers() { return _conc_workers; }
720
721 // Support for parallelizing Eden rescan in CMS remark phase
722 void sample_eden(); // ... sample Eden space top
723
724 private:
725 // Support for parallelizing young gen rescan in CMS remark phase
726 ParNewGeneration* _young_gen;
727
728 HeapWord* volatile* _top_addr; // ... Top of Eden
729 HeapWord** _end_addr; // ... End of Eden
730 Mutex* _eden_chunk_lock;
731 HeapWord** _eden_chunk_array; // ... Eden partitioning array
732 size_t _eden_chunk_index; // ... top (exclusive) of array
733 size_t _eden_chunk_capacity; // ... max entries in array
734
735 // Support for parallelizing survivor space rescan
736 HeapWord** _survivor_chunk_array;
737 size_t _survivor_chunk_index;
738 size_t _survivor_chunk_capacity;
739 size_t* _cursor;
740 ChunkArray* _survivor_plab_array;
741
742 // Support for marking stack overflow handling
743 bool take_from_overflow_list(size_t num, CMSMarkStack* to_stack);
744 bool par_take_from_overflow_list(size_t num,
745 OopTaskQueue* to_work_q,
746 int no_of_gc_threads);
747 void push_on_overflow_list(oop p);
748 void par_push_on_overflow_list(oop p);
|