RFR(s): 8235410: Enable handshakes on Linux x86 (32-bit)
David Holmes
david.holmes at oracle.com
Fri Dec 6 12:13:29 UTC 2019
On 6/12/2019 7:22 pm, Robbin Ehn wrote:
> Thanks David!
>
> On 2019-12-05 22:36, David Holmes wrote:
>>> diff -r 636d71e53732 src/hotspot/cpu/x86/globals_x86.hpp
>>> --- a/src/hotspot/cpu/x86/globals_x86.hpp Wed Dec 04 10:26:32 2019
>>> +0100
>>> +++ b/src/hotspot/cpu/x86/globals_x86.hpp Thu Dec 05 14:13:57 2019
>>> +0100
>>> @@ -89,12 +89,7 @@
>>>
>>> define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
>>>
>>> -#if defined(_LP64) || defined(_WINDOWS)
>>> define_pd_global(bool, ThreadLocalHandshakes, true);
>>> -#else
>>> -// get_thread() is slow on linux 32 bit, therefore off by default
>>
>> Why would get_thread be slow on linux 32-bit? Have we discussed this
>> when handshakes went in? I'm feeling surprised now to see only 32-bit
>> Linux was disabled.
>
> You actually explained it RFR for 32-bit TLH:
>
> "Thread::current() already uses compiler-based TLS. get_thread (on
> non-Windows x86) make a VM call to Thread::current(). If we want to get
> faster here we have to introduce compiler specific hooks directly into
> the TLS implementation (not nice to do initially or maintain). "
>
> :)
Sad how much one forgets :(
Right get_thread in 32-bit non-Windows has to make the VM call, whereas
on 64-bit we have the r15_thread register dedicated.
David
> /Robbin
>
>
>>
>> Thanks,
>> David
>>
>>> -define_pd_global(bool, ThreadLocalHandshakes, false);
>>> -#endif
>>>
>>> #define ARCH_FLAGS(develop, \
>>> product, \
More information about the hotspot-dev
mailing list