RFR(S) 8191437: AOT doesn't work easily after thread local handshakes

dean.long at oracle.com dean.long at oracle.com
Thu Nov 30 17:05:35 UTC 2017


On 11/30/17 8:51 AM, Andrew Haley wrote:

> On 29/11/17 21:07, dean.long at oracle.com wrote:
>> Pull request:
>>
>> https://github.com/graalvm/graal/pull/265
>>
>> I could use some Aarch64 reviewers and testers.
> One thing breaks, and we need this hunk instead:
>
> diff -r 4c25d37d8557 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java
> --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java	Thu Nov 30 16:08:13 2017 +0100
> +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java	Thu Nov 30 16:48:18 2017 +0000
> @@ -94,4 +105,14 @@
>           }
>       }
>
> +    private static void emitThreadLocalPoll(CompilationResultBuilder crb, AArch64MacroAssembler masm, GraalHotSpotVMConfig config, boolean onReturn, Register thread, Register scratch, LIRFrameState state) {
> +        assert config.threadPollingPageOffset >= 0;
> +        masm.ldr(64, scratch, masm.makeAddress(thread, config.threadPollingPageOffset, 8));
> +        crb.recordMark(onReturn ? config.MARKID_POLL_RETURN_FAR : config.MARKID_POLL_FAR);
> +        if (state != null) {
> +            crb.recordInfopoint(masm.position(), state, InfopointReason.SAFEPOINT);
> +        }
> +        masm.ldr(32, zr, AArch64Address.createBaseRegisterOnlyAddress(scratch));
> +    }
> +
>   }
>
> The only difference from what you pushed in MARKID_POLL_*FAR instead
> of MARKID_POLL_*NEAR.
>
> This is because we don't support MARKID_POLL_NEAR relocs in jvmci.
> They can't happen, anyway: that's effectively dead code in AArch64's
> Graal.

That makes sense.  Thanks for testing and fixing it.

dl

> Thanks.
>



More information about the hotspot-dev mailing list