RFR: 8237363: Remove automatic is in heap verification in OopIterateClosure
stefan.karlsson at oracle.com
Fri Jan 17 13:31:05 UTC 2020
Please review this patch to remove the automatic "is in heap"
verification from OopIterateClosure.
OopIterateClosure provides some automatic verification that loaded
objects are inside the heap. Closures can opt out from this by
I propose that we move this verification, and the way to turn it off,
and instead let the implementations of the closures decide the kind of
verification that is appropriate. I want to do this to de-clutter the
closure APIs a bit.
I've gone through all OopIterateClosures that don't override
should_verify_oops() and added calls to
assert_oop_field_points_to_object_in_heap[_or_null] where the closures
didn't have equivalent checks.
A lot of the places didn't explicitly check that the object is within
the heap but they would check for other things like:
- Is the corresponding bit index within the range
- Is the heap region index within range
- Is the object in the reserved heap range (weaker than is_in)
I've added asserts to those places. If you think I should remove some of
them, please let me now.
Tested with tier1-3
More information about the hotspot-gc-dev