File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -639,8 +639,7 @@ void G1ConcurrentMark::reset_marking_for_restart() {
639639 _finger = _heap.start ();
640640
641641 for (uint i = 0 ; i < _max_num_tasks; ++i) {
642- G1CMTaskQueue* queue = _task_queues->queue (i);
643- queue->set_empty ();
642+ _tasks[i]->reset_for_restart ();
644643 }
645644}
646645
@@ -1943,11 +1942,7 @@ bool G1ConcurrentMark::concurrent_cycle_abort() {
19431942 return false ;
19441943 }
19451944
1946- // Empty mark stack
19471945 reset_marking_for_restart ();
1948- for (uint i = 0 ; i < _max_num_tasks; ++i) {
1949- _tasks[i]->clear_region_fields ();
1950- }
19511946
19521947 abort_marking_threads ();
19531948
@@ -2118,6 +2113,13 @@ void G1CMTask::reset(G1CMBitMap* mark_bitmap) {
21182113 _mark_stats_cache.reset ();
21192114}
21202115
2116+ void G1CMTask::reset_for_restart () {
2117+ clear_region_fields ();
2118+ _task_queue->set_empty ();
2119+ TASKQUEUE_STATS_ONLY (_partial_array_splitter.stats ()->reset ());
2120+ TASKQUEUE_STATS_ONLY (_task_queue->stats .reset ());
2121+ }
2122+
21212123void G1CMTask::register_partial_array_splitter () {
21222124
21232125 ::new (&_partial_array_splitter) PartialArraySplitter (_cm->partial_array_state_manager (),
Original file line number Diff line number Diff line change @@ -844,8 +844,10 @@ class G1CMTask : public TerminatorTerminator {
844844 // Apply the closure to the given range of elements in the objArray.
845845 inline void process_array_chunk (objArrayOop obj, size_t start, size_t end);
846846public:
847- // Resets the task; should be called right at the beginning of a marking phase.
847+ // Resets the task completely for a new marking ; should be called right at the beginning of a marking phase.
848848 void reset (G1CMBitMap* mark_bitmap);
849+ // Minimal reset of the task, making it ready for continuing to mark.
850+ void reset_for_restart ();
849851 // Register/unregister Partial Array Splitter Allocator with the PartialArrayStateManager.
850852 // This allows us to discard memory arenas used for partial object array states at the end
851853 // of a concurrent mark cycle.
You can’t perform that action at this time.
0 commit comments