Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 343:afc1ce1efe66
6710665: G1: guarantee(_cm->out_of_regions() && _cm->region_stack_empty() && _task_queue->size() == 0, ...)
Summary: Remove the incorrect assumptions from guarantee()s.
Reviewed-by: ysr, tonyp
author | iveresov |
---|---|
date | Wed, 11 Jun 2008 05:12:19 -0700 |
parents | 37f87013dfd8 |
children | 0edda524b58c |
comparison
equal
deleted
inserted
replaced
342:37f87013dfd8 | 343:afc1ce1efe66 |
---|---|
3749 } | 3749 } |
3750 } while ( _curr_region != NULL && !has_aborted()); | 3750 } while ( _curr_region != NULL && !has_aborted()); |
3751 | 3751 |
3752 if (!has_aborted()) { | 3752 if (!has_aborted()) { |
3753 // We cannot check whether the global stack is empty, since other | 3753 // We cannot check whether the global stack is empty, since other |
3754 // tasks might be pushing objects to it concurrently. | 3754 // tasks might be pushing objects to it concurrently. We also cannot |
3755 tmp_guarantee_CM( _cm->out_of_regions() && _cm->region_stack_empty(), | 3755 // check if the region stack is empty because if a thread is aborting |
3756 // it can push a partially done region back. | |
3757 tmp_guarantee_CM( _cm->out_of_regions(), | |
3756 "at this point we should be out of regions" ); | 3758 "at this point we should be out of regions" ); |
3757 | 3759 |
3758 if (_cm->verbose_low()) | 3760 if (_cm->verbose_low()) |
3759 gclog_or_tty->print_cr("[%d] all regions claimed", _task_id); | 3761 gclog_or_tty->print_cr("[%d] all regions claimed", _task_id); |
3760 | 3762 |
3772 if (!has_aborted()) { | 3774 if (!has_aborted()) { |
3773 // We have not aborted. This means that we have finished all that | 3775 // We have not aborted. This means that we have finished all that |
3774 // we could. Let's try to do some stealing... | 3776 // we could. Let's try to do some stealing... |
3775 | 3777 |
3776 // We cannot check whether the global stack is empty, since other | 3778 // We cannot check whether the global stack is empty, since other |
3777 // tasks might be pushing objects to it concurrently. | 3779 // tasks might be pushing objects to it concurrently. We also cannot |
3780 // check if the region stack is empty because if a thread is aborting | |
3781 // it can push a partially done region back. | |
3778 guarantee( _cm->out_of_regions() && | 3782 guarantee( _cm->out_of_regions() && |
3779 _cm->region_stack_empty() && | |
3780 _task_queue->size() == 0, "only way to reach here" ); | 3783 _task_queue->size() == 0, "only way to reach here" ); |
3781 | 3784 |
3782 if (_cm->verbose_low()) | 3785 if (_cm->verbose_low()) |
3783 gclog_or_tty->print_cr("[%d] starting to steal", _task_id); | 3786 gclog_or_tty->print_cr("[%d] starting to steal", _task_id); |
3784 | 3787 |
3809 | 3812 |
3810 // We still haven't aborted. Now, let's try to get into the | 3813 // We still haven't aborted. Now, let's try to get into the |
3811 // termination protocol. | 3814 // termination protocol. |
3812 if (!has_aborted()) { | 3815 if (!has_aborted()) { |
3813 // We cannot check whether the global stack is empty, since other | 3816 // We cannot check whether the global stack is empty, since other |
3814 // tasks might be concurrently pushing objects on it. | 3817 // tasks might be concurrently pushing objects on it. We also cannot |
3818 // check if the region stack is empty because if a thread is aborting | |
3819 // it can push a partially done region back. | |
3815 guarantee( _cm->out_of_regions() && | 3820 guarantee( _cm->out_of_regions() && |
3816 _cm->region_stack_empty() && | |
3817 _task_queue->size() == 0, "only way to reach here" ); | 3821 _task_queue->size() == 0, "only way to reach here" ); |
3818 | 3822 |
3819 if (_cm->verbose_low()) | 3823 if (_cm->verbose_low()) |
3820 gclog_or_tty->print_cr("[%d] starting termination protocol", _task_id); | 3824 gclog_or_tty->print_cr("[%d] starting termination protocol", _task_id); |
3821 | 3825 |