[16] RFR 8248227: Shenandoah: Refactor Shenandoah::heap() to match other GCs

Zhengyu Gu zgu at redhat.com
Mon Jun 29 13:29:38 UTC 2020

Hi Aleksey,

On 6/29/20 3:04 AM, Aleksey Shipilev wrote:
> On 6/24/20 2:18 PM, Zhengyu Gu wrote:
>> Please review this small patch that refactors Shenandoah::heap() to
>> match other GCs.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8248227
>> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8248227/webev.00/index.html
> Wait. We do the same thing as ZHeap::heap(). This patch clashes with the intent of JDK-8241743. At
> very least we have to prove it compiles down to the same.

Based on comments of JDK-8247740, it intends to make the call inline-able.

ZGC is different story, it is not derived from CollectedHeap.

I checked a few places, it does seem to inline ShenandoahHeap::heap() 
calls, e.g.

    0x00007ffff780c29c <+28>:	push   %rbx
    0x00007ffff780c29d <+29>:	sub    $0x48,%rsp
    0x00007ffff780c2a1 <+33>:	lea    0x54e8c8(%rip),%rax        # 
0x7ffff7d5ab70 <_ZN14ShenandoahHeap5_heapE>
    0x00007ffff780c2a8 <+40>:	mov    (%rax),%rbx

Please feel free to reject the patch, if you otherwise.



More information about the hotspot-gc-dev mailing list