RFR [14u]: 8241603: ZGC: java/lang/management/MemoryMXBean/MemoryTestZGC.sh crashes on macOS

Per Liden per.liden at oracle.com
Sun May 3 07:05:54 UTC 2020


On 5/1/20 5:37 PM, Langer, Christoph wrote:
> Hi,
> 
> please review the 14u backport of this ZGC fix for MacOS. We see the 
> crash in 14, too.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8241603
> 
> Original Change: https://hg.openjdk.java.net/jdk/jdk/rev/f94239dfb99d
> 
> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8241603.14u/
> 
> The fix would apply cleanly but Atomic::fetch_and_add does not exist in 
> 14. So I had to change:
> 
> processor_id = Atomic::fetch_and_add(&processor_id_next, 1) % 
> os::processor_count();
> 
> to
> 
> processor_id = (Atomic::add(&processor_id_next, 1) - 1) % 
> os::processor_count();

Looks good!

/Per

> 
> Thanks
> 
> Christoph
> 



More information about the hotspot-gc-dev mailing list