ZGC: Remove usage of arrayOopDesc::max_array_length_in_bytes
Per Liden
per.liden at oracle.com
Wed May 16 12:42:17 UTC 2018
Looks good!
/Per
On 2018-05-16 14:35, Stefan Karlsson wrote:
> Hi all,
>
> The following UPSTREAM patch is incorrect and the function is weirdly
> named:
> http://hg.openjdk.java.net/zgc/zgc/rev/32baead3cec8
>
> Instead of fixing it I propose that we delete that patch and replace the
> single usage of max_array_length_in_bytes with:
>
> diff --git a/src/hotspot/share/gc/z/zMark.cpp
> b/src/hotspot/share/gc/z/zMark.cpp
> --- a/src/hotspot/share/gc/z/zMark.cpp
> +++ b/src/hotspot/share/gc/z/zMark.cpp
> @@ -194,7 +194,7 @@
> }
>
> void ZMark::follow_large_array(uintptr_t addr, size_t size, bool
> finalizable) {
> - assert(size <= arrayOopDesc::max_array_length_in_bytes(T_OBJECT),
> "Too large");
> + assert(size <= (size_t)arrayOopDesc::max_array_length(T_OBJECT) *
> oopSize, "Too large");
> assert(size > ZMarkPartialArrayMinSize, "Too small, should not be
> split");
> const uintptr_t start = addr;
> const uintptr_t end = start + size;
>
>
> Thanks,
> StefanK
More information about the zgc-dev
mailing list