Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp @ 6254:a2f7274eb6ef
7114678: G1: various small fixes, code cleanup, and refactoring
Summary: Various cleanups as a prelude to introducing iterators for HeapRegions.
Reviewed-by: johnc, brutisso
author | tonyp |
---|---|
date | Thu, 19 Jul 2012 15:15:54 -0700 |
parents | 720b6a76dd9d |
children | 992f62c457b0 58fc1b1523dc |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp Tue Jul 17 12:24:05 2012 -0700 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp Thu Jul 19 15:15:54 2012 -0700 @@ -33,11 +33,7 @@ // Assumes the caller has already verified the region. _length += 1; - if (!hr->isHumongous()) { - _region_num += 1; - } else { - _region_num += calculate_region_num(hr); - } + _region_num += hr->region_num(); _total_used_bytes += hr->used(); } @@ -54,12 +50,7 @@ assert(_length > 0, hrs_ext_msg(this, "pre-condition")); _length -= 1; - uint region_num_diff; - if (!hr->isHumongous()) { - region_num_diff = 1; - } else { - region_num_diff = calculate_region_num(hr); - } + uint region_num_diff = hr->region_num(); assert(region_num_diff <= _region_num, hrs_err_msg("[%s] region's region num: %u " "should be <= region num: %u",