RFR: 8237363: Remove automatic is in heap verification in OopIterateClosure

Thomas Schatzl thomas.schatzl at oracle.com
Thu Jan 23 13:33:05 UTC 2020


On 23.01.20 14:01, Per Liden wrote:
> Hi,
> On 1/23/20 11:24 AM, Thomas Schatzl wrote:
> [...]
>>>   It is true that other code typically has many
>>>> other asserts that would fail anyway, but it would be an additional 
>>>> safety net when writing new closures.
>>> It's a safety net that works for G1, but almost always is incorrectly 
>>> trips in the assert with ZGC.
>> It works for all GCs (+leak profiler) but ZGC given the webrev. This 
>> does not suggest that this is GC-specific functionality at all. The 
>> verification method also seems to only uses an innocuous 
>> CollectedHeap::is_in() call that seems something very basic to support 
>> for a GC.
>> What is it in ZGC that prevents CollectedHeap::is_in() to return the 
>> expected value?
> ZGC is returning the expected value. The problem here is that the 
> verification happens _before_ the closure is applied, i.e. it asks if an 
> oop that has not yet been fixed points into the heap. ZGC's is_in() is 
> precise (i.e. cares about which heap view an oop points into), so an oop 
> with a bad color is not considered to point into the heap. It's a 
> feature, as it allows for exact verification and will catch oops with 
> bad colors.

   thanks. After some internal discussions: looks good.


More information about the hotspot-gc-dev mailing list