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