comparison src/share/vm/gc_implementation/g1/concurrentMark.hpp @ 3378:69293e516993

7041440: G1: assert(obj->is_oop_or_null(true )) failed: Error # Summary: During an evacuation pause clear the region fields of any concurrent marking task whose local finger points into the collection set as the values in the region fields will become stale. Clearing these fields causes the concurrent mark task to claim a new region when marking restarts after the pause. Reviewed-by: tonyp, iveresov
author johnc
date Tue, 17 May 2011 00:56:01 -0700
parents cd8e33b2a8ad
children 842b840e67db
comparison
equal deleted inserted replaced
3377:2aa9ddbb9e60 3378:69293e516993
807 807
808 void complete_marking_in_collection_set(); 808 void complete_marking_in_collection_set();
809 809
810 // It indicates that a new collection set is being chosen. 810 // It indicates that a new collection set is being chosen.
811 void newCSet(); 811 void newCSet();
812
812 // It registers a collection set heap region with CM. This is used 813 // It registers a collection set heap region with CM. This is used
813 // to determine whether any heap regions are located above the finger. 814 // to determine whether any heap regions are located above the finger.
814 void registerCSetRegion(HeapRegion* hr); 815 void registerCSetRegion(HeapRegion* hr);
816
817 // Resets the region fields of any active CMTask whose region fields
818 // are in the collection set (i.e. the region currently claimed by
819 // the CMTask will be evacuated and may be used, subsequently, as
820 // an alloc region). When this happens the region fields in the CMTask
821 // are stale and, hence, should be cleared causing the worker thread
822 // to claim a new region.
823 void reset_active_task_region_fields_in_cset();
815 824
816 // Registers the maximum region-end associated with a set of 825 // Registers the maximum region-end associated with a set of
817 // regions with CM. Again this is used to determine whether any 826 // regions with CM. Again this is used to determine whether any
818 // heap regions are located above the finger. 827 // heap regions are located above the finger.
819 void register_collection_set_finger(HeapWord* max_finger) { 828 void register_collection_set_finger(HeapWord* max_finger) {
1037 // it updates the local fields after this task has claimed 1046 // it updates the local fields after this task has claimed
1038 // a new region to scan 1047 // a new region to scan
1039 void setup_for_region(HeapRegion* hr); 1048 void setup_for_region(HeapRegion* hr);
1040 // it brings up-to-date the limit of the region 1049 // it brings up-to-date the limit of the region
1041 void update_region_limit(); 1050 void update_region_limit();
1042 // it resets the local fields after a task has finished scanning a
1043 // region
1044 void giveup_current_region();
1045 1051
1046 // called when either the words scanned or the refs visited limit 1052 // called when either the words scanned or the refs visited limit
1047 // has been reached 1053 // has been reached
1048 void reached_limit(); 1054 void reached_limit();
1049 // recalculates the words scanned and refs visited limits 1055 // recalculates the words scanned and refs visited limits
1091 int task_id() { return _task_id; } 1097 int task_id() { return _task_id; }
1092 1098
1093 // From TerminatorTerminator. It determines whether this task should 1099 // From TerminatorTerminator. It determines whether this task should
1094 // exit the termination protocol after it's entered it. 1100 // exit the termination protocol after it's entered it.
1095 virtual bool should_exit_termination(); 1101 virtual bool should_exit_termination();
1102
1103 // Resets the local region fields after a task has finished scanning a
1104 // region; or when they have become stale as a result of the region
1105 // being evacuated.
1106 void giveup_current_region();
1096 1107
1097 HeapWord* finger() { return _finger; } 1108 HeapWord* finger() { return _finger; }
1098 1109
1099 bool has_aborted() { return _has_aborted; } 1110 bool has_aborted() { return _has_aborted; }
1100 void set_has_aborted() { _has_aborted = true; } 1111 void set_has_aborted() { _has_aborted = true; }