RFR (T) 8250519: [REDO] Move mirror oops from Universe into OopStorage

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Fri Jul 24 21:43:58 UTC 2020


Dan, Thank you for noticing this.  Yes, when I checked in the OopStorage 
mirror patch, I removed the "replace" function because it was the same 
function in the patch where I added the assert for this bug (what I 
called the "assert" patch):

https://bugs.openjdk.java.net/browse/JDK-8249822

https://hg.openjdk.java.net/jdk/jdk/rev/a36b9f6adbf2

So I actually had already checked this function in.

The only difference in this 8250519 should be the NULL check.

Thanks,
Coleen


On 7/24/20 5:37 PM, Daniel D. Daugherty wrote:
> On 7/24/20 5:07 PM, coleen.phillimore at oracle.com wrote:
>> Summary: The original patch but add a null pointer check so an 
>> OopHandle is not created if a NULL is read from the archive.
>>
>> If a NULL is read from the archive, we shouldn't create an OopHandle 
>> for it because one will be created in initialize_basic_type_mirrors.  
>> The assert added in the previous patch I pushed detected that.
>>
>> incremental change to original change: 
>> http://cr.openjdk.java.net/~coleenp/2020/8250519.01.incr/webrev
>> full webrev at 
>> http://cr.openjdk.java.net/~coleenp/2020/8250519.01/webrev
>>
>> Retested with tier1-3.
>>
>> Thanks,
>> Coleen
>
> Okay. So I compared this patch:
>
> http://cr.openjdk.java.net/~coleenp/2020/8249938.02/webrev/open.patch
>
> with this patch:
>
> http://cr.openjdk.java.net/~coleenp/2020/8250519.01/webrev/open.patch
>
> And in addition to the change described above, there are two changes
> in the original patch that are not in the new patch:
>
> --- old/src/hotspot/share/oops/oopHandle.hpp    2020-07-23 
> 21:40:56.177635044 -0400
> +++ new/src/hotspot/share/oops/oopHandle.hpp    2020-07-23 
> 21:40:55.717623090 -0400
> @@ -52,6 +52,8 @@
>
>    inline void release(OopStorage* storage);
>
> +  inline void replace(oop obj);
> +
>    // Used only for removing handle.
>    oop* ptr_raw() const { return _obj; }
>  };
> --- old/src/hotspot/share/oops/oopHandle.inline.hpp    2020-07-23 
> 21:40:56.721649181 -0400
> +++ new/src/hotspot/share/oops/oopHandle.inline.hpp    2020-07-23 
> 21:40:56.257637123 -0400
> @@ -54,4 +54,10 @@
>    }
>  }
>
> +inline void OopHandle::replace(oop obj) {
> +  oop* ptr = ptr_raw();
> +  assert(ptr != NULL, "should not use replace");
> +  NativeAccess<>::oop_store(ptr, obj);
> +}
> +
>  #endif // SHARE_OOPS_OOPHANDLE_INLINE_HPP
>
> So it looks like you are removing this OopHandle::replace() function
> also. Is that intentional?
>
> Dan



More information about the hotspot-runtime-dev mailing list