RFR (S) 8218140: Build failures after JDK-8218041 (Assorted wrong/missing includes)

Stefan Karlsson stefan.karlsson at oracle.com
Thu Jan 31 13:30:21 UTC 2019


On 2019-01-31 13:40, Aleksey Shipilev wrote:
> AArch64 has "special" relationship with thread.inline.hpp -- JavaThread::thread_state() is defined
> as such:
> 
> src/hotspot/share/runtime/thread.inline.hpp:
> 
> #if defined(PPC64) || defined (AARCH64)
> inline JavaThreadState JavaThread::thread_state() const    {
>    return (JavaThreadState) OrderAccess::load_acquire((volatile jint*)&_thread_state);
> }
> 
> inline void JavaThread::set_thread_state(JavaThreadState s) {
>    OrderAccess::release_store((volatile jint*)&_thread_state, (jint)s);
> }
> #endif
> 
> Which does break aarch64 every once in a while:
>    https://bugs.openjdk.java.net/browse/JDK-8216591
>    https://bugs.openjdk.java.net/browse/JDK-8203278
>    https://bugs.openjdk.java.net/browse/JDK-8201799
> 
> ...and shared files have to include that thread.inline.hpp then.

This is really awkward. Some platforms require thread.hpp while others 
require thread.inline.hpp. I think we should enforce the same include 
requirement for all platforms, otherwise these kind of problems will 
happen again.

We "recently" removed the orderAccess_<platform>.inline.hpp to allow 
OrderAcess to be used in headers. Maybe it's time to simply move the 
code above to thread.hpp? That would remove this source of compile errors.

Thanks,
StefanK

> 
> -Aleksey
> 
> On 1/31/19 1:32 PM, David Holmes wrote:
>> cc'ing Robbin.
>>
>> I can understand the Aaarch64 specific file may have an issue but I don't see how we can still have
>> shared files that need changing.
>>
>> ???
>>
>> David
>>
>> On 31/01/2019 10:26 pm, Aleksey Shipilev wrote:
>>> Bug:
>>>     https://bugs.openjdk.java.net/browse/JDK-8218140
>>>
>>> Fix:
>>>    http://cr.openjdk.java.net/~shade/8218140/webrev.01/
>>>
>>> Testing: Linux {x86_64, aarch64} compilation
>>>
>>> Maybe some other platforms are failing too? I would be happy to fold their fixes into this patch. So
>>> far I see only AArch64 is broken.
>>>
>>> -Aleksey
>>>
> 
> 


More information about the hotspot-dev mailing list