RFR: 8189596: AArch64: implementation for Thread-local handshakes (original) (raw)

Andrew Haley aph at redhat.com
Mon Nov 27 15:47:11 UTC 2017


On 27/11/17 15:30, Dmitry Samersov wrote:

Andrew,

http://cr.openjdk.java.net/~aph/8189596-2 1. interpmasmaarch64.cpp 456 if (needsthreadlocalpoll) { It might be better to put the code related to needsthreadlocalpoll into the single block for better readability. Approx : if (needsthreadlocalpoll) { NOTPRODUCT(blockcomment("Thread-local Safepoint poll")); ldr(rscratch2, Address(rthread, Thread::pollingpageoffset())); tbz(rscratch2, exactlog2(SafepointMechanism::pollbit()), notsafepoint); lea(rscratch2, ExternalAddress((address)safepointtable)); ldr(rscratch2, Address(rscratch2, rscratch1, Address::uxtw(3))); br(rscratch2); } bind(notsafepoint);

I didn't want to do that because I wanted to put the uncommon case out of line. In any case, I don't think it warrants a respin.

2. macroAssembleraarch64.cpp

321 safepointpoll(slowpath); It might be better to put global poll code to a separate function, to avoid double checking of SafepointMechanism::usesthreadlocalpoll();

We don't need to do it for efficiency because GCC already knows how to do that. I can't think of any other reason we'd want to change it.

3. templateInterpreterGeneratoraarch64.cpp : 1382

1382 _ safepointpollacquire(L); Do we really need acquire here?

I believe so,, for the reason discussed upthread. We need to do it whenever transitioning from native to Java state.

-- Andrew Haley Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-dev mailing list