< prev index next >

src/hotspot/cpu/arm/templateTable_arm.cpp

Print this page
rev 48562 : [mq]: heap23


4391 
4392   // Allocate the instance:
4393   //  If TLAB is enabled:
4394   //    Try to allocate in the TLAB.
4395   //    If fails, go to the slow path.
4396   //  Else If inline contiguous allocations are enabled:
4397   //    Try to allocate in eden.
4398   //    If fails due to heap end, go to slow path.
4399   //
4400   //  If TLAB is enabled OR inline contiguous is enabled:
4401   //    Initialize the allocation.
4402   //    Exit.
4403   //
4404   //  Go to slow path.
4405   if (UseTLAB) {
4406     const Register Rtlab_top = R1_tmp;
4407     const Register Rtlab_end = R2_tmp;
4408     assert_different_registers(Robj, Rsize, Rklass, Rtlab_top, Rtlab_end);
4409 
4410     __ ldr(Robj, Address(Rthread, JavaThread::tlab_top_offset()));
4411     __ ldr(Rtlab_end, Address(Rthread, in_bytes(JavaThread::tlab_end_offset())));
4412     __ add(Rtlab_top, Robj, Rsize);
4413     __ cmp(Rtlab_top, Rtlab_end);
4414     __ b(slow_case, hi);
4415     __ str(Rtlab_top, Address(Rthread, JavaThread::tlab_top_offset()));
4416     if (ZeroTLAB) {
4417       // the fields have been already cleared
4418       __ b(initialize_header);
4419     } else {
4420       // initialize both the header and fields
4421       __ b(initialize_object);
4422     }
4423   } else {
4424     // Allocation in the shared Eden, if allowed.
4425     if (allow_shared_alloc) {
4426       const Register Rheap_top_addr = R2_tmp;
4427       const Register Rheap_top = R5_tmp;
4428       const Register Rheap_end = Rtemp;
4429       assert_different_registers(Robj, Rklass, Rsize, Rheap_top_addr, Rheap_top, Rheap_end, LR);
4430 
4431       // heap_end now (re)loaded in the loop since also used as a scratch register in the CAS




4391 
4392   // Allocate the instance:
4393   //  If TLAB is enabled:
4394   //    Try to allocate in the TLAB.
4395   //    If fails, go to the slow path.
4396   //  Else If inline contiguous allocations are enabled:
4397   //    Try to allocate in eden.
4398   //    If fails due to heap end, go to slow path.
4399   //
4400   //  If TLAB is enabled OR inline contiguous is enabled:
4401   //    Initialize the allocation.
4402   //    Exit.
4403   //
4404   //  Go to slow path.
4405   if (UseTLAB) {
4406     const Register Rtlab_top = R1_tmp;
4407     const Register Rtlab_end = R2_tmp;
4408     assert_different_registers(Robj, Rsize, Rklass, Rtlab_top, Rtlab_end);
4409 
4410     __ ldr(Robj, Address(Rthread, JavaThread::tlab_top_offset()));
4411     __ ldr(Rtlab_end, Address(Rthread, in_bytes(JavaThread::tlab_current_end_offset())));
4412     __ add(Rtlab_top, Robj, Rsize);
4413     __ cmp(Rtlab_top, Rtlab_end);
4414     __ b(slow_case, hi);
4415     __ str(Rtlab_top, Address(Rthread, JavaThread::tlab_top_offset()));
4416     if (ZeroTLAB) {
4417       // the fields have been already cleared
4418       __ b(initialize_header);
4419     } else {
4420       // initialize both the header and fields
4421       __ b(initialize_object);
4422     }
4423   } else {
4424     // Allocation in the shared Eden, if allowed.
4425     if (allow_shared_alloc) {
4426       const Register Rheap_top_addr = R2_tmp;
4427       const Register Rheap_top = R5_tmp;
4428       const Register Rheap_end = Rtemp;
4429       assert_different_registers(Robj, Rklass, Rsize, Rheap_top_addr, Rheap_top, Rheap_end, LR);
4430 
4431       // heap_end now (re)loaded in the loop since also used as a scratch register in the CAS


< prev index next >