RFR (S) 8203479: JFR enabled ARM32 build assertion failure

David Holmes david.holmes at oracle.com
Mon Jun 18 02:39:15 UTC 2018


Hi Boris,

On 15/06/2018 8:44 PM, Boris Ulasevich wrote:
> Hi,
> 
> Please review the following patch:
>    http://cr.openjdk.java.net/~bulasevich/8203479/webrev.01
>    https://bugs.openjdk.java.net/browse/JDK-8203479
> 
> Assertion fires in JFR codes on first VM thread setup because VM globals 
> are not yet initialized (and supports_cx8 property is not predefined for 
> ARM32 platform). I propose to exploit early_initialize() method to set 
> up supports_cx8 property on early stage of VM initialization.

Your fix looks good. Please update copyright years.

Just some additional commentary ... from the bug report:

First _supports_cx8 usage:
   Threads::create_vm -> JavaThread::JavaThread(bool) --> 
Thread::Thread() --> JfrThreadLocal::JfrThreadLocal() --> 
atomic_inc(unsigned long long volatile*)

I'm not sure when this was introduced but it's risky to perform atomic 
operations on jlong early during VM initialization. Apart from the 
problem you encountered with ARM32, on some platforms it may require 
that the stub-generator has been initialized. (Though in that case we 
may harmlessly fallback to using non-atomic operations - which is okay 
when creating the initial JavaThread.)

Thanks,
David

> Thanks
> Boris


More information about the hotspot-dev mailing list