Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegionSeq.cpp @ 2172:a672e43650cc
7013718: G1: small fixes for two assert/guarantee failures
Summary: Two small fixes to deal with a guarantee failure (the marking thread should join the SuspendibleThreadSet before calling a method that does pause prediction work so that said method is never called during a pause) and an assert failure (an assert is too strong).
Reviewed-by: iveresov, johnc
author | tonyp |
---|---|
date | Fri, 21 Jan 2011 11:30:22 -0500 |
parents | 0fa27f37d4d4 |
children | 1216415d8e35 |
comparison
equal
deleted
inserted
replaced
2153:377371490991 | 2172:a672e43650cc |
---|---|
193 } | 193 } |
194 if (res != -1) { | 194 if (res != -1) { |
195 assert(0 <= res && res < _regions.length(), | 195 assert(0 <= res && res < _regions.length(), |
196 err_msg("res: %d should be valid", res)); | 196 err_msg("res: %d should be valid", res)); |
197 _alloc_search_start = res + (int) num; | 197 _alloc_search_start = res + (int) num; |
198 } | 198 assert(0 < _alloc_search_start && _alloc_search_start <= _regions.length(), |
199 assert(0 < _alloc_search_start && _alloc_search_start <= _regions.length(), | 199 err_msg("_alloc_search_start: %d should be valid", |
200 err_msg("_alloc_search_start: %d should be valid", | 200 _alloc_search_start)); |
201 _alloc_search_start)); | 201 } |
202 return res; | 202 return res; |
203 } | 203 } |
204 | 204 |
205 void HeapRegionSeq::iterate(HeapRegionClosure* blk) { | 205 void HeapRegionSeq::iterate(HeapRegionClosure* blk) { |
206 iterate_from((HeapRegion*)NULL, blk); | 206 iterate_from((HeapRegion*)NULL, blk); |