RFR (S) 8202705: ARM32 build crashes on long JavaThread offsets

Boris Ulasevich boris.ulasevich at bell-sw.com
Mon Jun 4 13:18:41 UTC 2018


Hi Alexey,

good point! But Rthread is not something we can redefine:

 > register_arm.hpp:
 > #define Rthread R10

Let us just leave comments and work with Ralloc:

   // Borrow the Rthread for alloc counter
   Register Ralloc = Rthread;
   add(Ralloc, Ralloc, in_bytes(JavaThread::allocated_bytes_offset()));

   ... (work with Ralloc)

   // Unborrow the Rthread
   sub(Rthread, Ralloc, in_bytes(JavaThread::allocated_bytes_offset()));

Webrev:
   http://cr.openjdk.java.net/~bulasevich/8202705/webrev.02/

regards,
Boris

On 04.06.2018 15:10, Aleksey Shipilev wrote:
> On 06/04/2018 01:58 PM, Boris Ulasevich wrote:
>> Hello all,
>>
>> Please review this patch to allow ARM32 MacroAssembler to handle updated JavaThread offsets:
>>    http://cr.openjdk.java.net/~bulasevich/8202705/webrev.01/
>>    https://bugs.openjdk.java.net/browse/JDK-8202705
> 
> Looks okay, but Rthread becomes misnomer in the middle of the method.
> 
> Maybe like this?
> 
>   // Borrow the Rthread for alloc counter
>   Register Ralloc = Rthread;
>   Rthread = NULL;
>   add(Ralloc, Ralloc, in_bytes(JavaThread::allocated_bytes_offset());
> 
>   ...
>   <work with Ralloc>
>   ...
> 
>   // Unborrow the Rthread
>   sub(Ralloc, Ralloc, in_bytes(JavaThread::allocated_bytes_offset()
>   Rthread = Ralloc;
>   Ralloc = NULL;
> 
> -Aleksey
> 



More information about the hotspot-gc-dev mailing list