On Thu, 11 Jun 2026 20:10:08 GMT, Kevin Walls <[email protected]> wrote:
> We're checking "hr.top() == hrTop.top()" which compares top() of the HR we > got from the iterator, with hrTop.top() which is a HR we got by address, from > hr.top() or possibly from hr.top() - 1. > The regions should just be completely the same? But we don't need to add a > full comparison for this if we don't have it already. Yes, G1HeapRegionTable.getByAddress(hr.top()) should return hr. The purpose of the test is to verify [JDK-8194249](https://bugs.openjdk.org/browse/JDK-8194249), which has to do with G1HeapRegionTable.getByAddress() returning the wrong region. I think hr.top() was chosen because it makes a convenient heap address to lookup, although not so much if the region is unused, which is why I changed the test to do the same with all the regions. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31469#issuecomment-4685557516
