Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 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 | 2aa9ddbb9e60 |
children | 053d84a76d3d |
comparison
equal
deleted
inserted
replaced
3377:2aa9ddbb9e60 | 3378:69293e516993 |
---|---|
3321 // only iterate over these. (Since evacuation may add to the mark | 3321 // only iterate over these. (Since evacuation may add to the mark |
3322 // stack, doing more exposes race conditions.) If no mark is in | 3322 // stack, doing more exposes race conditions.) If no mark is in |
3323 // progress, this will be zero. | 3323 // progress, this will be zero. |
3324 _cm->set_oops_do_bound(); | 3324 _cm->set_oops_do_bound(); |
3325 | 3325 |
3326 if (mark_in_progress()) | 3326 if (mark_in_progress()) { |
3327 concurrent_mark()->newCSet(); | 3327 concurrent_mark()->newCSet(); |
3328 } | |
3328 | 3329 |
3329 #if YOUNG_LIST_VERBOSE | 3330 #if YOUNG_LIST_VERBOSE |
3330 gclog_or_tty->print_cr("\nBefore choosing collection set.\nYoung_list:"); | 3331 gclog_or_tty->print_cr("\nBefore choosing collection set.\nYoung_list:"); |
3331 _young_list->print(); | 3332 _young_list->print(); |
3332 g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty); | 3333 g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty); |
3333 #endif // YOUNG_LIST_VERBOSE | 3334 #endif // YOUNG_LIST_VERBOSE |
3334 | 3335 |
3335 g1_policy()->choose_collection_set(target_pause_time_ms); | 3336 g1_policy()->choose_collection_set(target_pause_time_ms); |
3337 | |
3338 // We have chosen the complete collection set. If marking is | |
3339 // active then, we clear the region fields of any of the | |
3340 // concurrent marking tasks whose region fields point into | |
3341 // the collection set as these values will become stale. This | |
3342 // will cause the owning marking threads to claim a new region | |
3343 // when marking restarts. | |
3344 if (mark_in_progress()) { | |
3345 concurrent_mark()->reset_active_task_region_fields_in_cset(); | |
3346 } | |
3336 | 3347 |
3337 // Nothing to do if we were unable to choose a collection set. | 3348 // Nothing to do if we were unable to choose a collection set. |
3338 #if G1_REM_SET_LOGGING | 3349 #if G1_REM_SET_LOGGING |
3339 gclog_or_tty->print_cr("\nAfter pause, heap:"); | 3350 gclog_or_tty->print_cr("\nAfter pause, heap:"); |
3340 print(); | 3351 print(); |