[aarch64-port-dev ] RFR: 8189596: AArch64: implementation for	Thread-local handshakes
    Dmitry Samersov 
    dmitry.samersoff at bell-sw.com
       
    Mon Nov 27 15:30:42 UTC 2017
    
    
  
Andrew,
> http://cr.openjdk.java.net/~aph/8189596-2
1. interp_masm_aarch64.cpp
 456   if (needs_thread_local_poll) {
It might be better to put the code related to needs_thread_local_poll
into the single block for better readability.
Approx :
if (needs_thread_local_poll) {
   NOT_PRODUCT(block_comment("Thread-local Safepoint poll"));
   ldr(rscratch2, Address(rthread, Thread::polling_page_offset()));
   tbz(rscratch2, exact_log2(SafepointMechanism::poll_bit()), notsafepoint);
   lea(rscratch2, ExternalAddress((address)safepoint_table));
   ldr(rscratch2, Address(rscratch2, rscratch1, Address::uxtw(3)));
   br(rscratch2);
}
bind(notsafepoint);
2. macroAssembler_aarch64.cpp
321     safepoint_poll(slow_path);
It might be better to put global poll code to a separate function, to
avoid double checking of SafepointMechanism::uses_thread_local_poll()
3. templateInterpreterGenerator_aarch64.cpp : 1382
1382     __ safepoint_poll_acquire(L);
Do we really need acquire here?
-Dmitry
On 24.11.2017 20:39, Andrew Haley wrote:
> On 24/11/17 10:36, Erik Österlund wrote:
>> By placing loading the local poll value with ldar *only* in the native 
>> wrapper wakeup function, you avoid these issues.
> 
> OK, thanks.
> 
> http://cr.openjdk.java.net/~aph/8189596-2
> 
    
    
More information about the aarch64-port-dev
mailing list