< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page
rev 49244 : [mq]: event-only


4053   //
4054   //  If TLAB is enabled OR inline contiguous is enabled:
4055   //    Initialize the allocation.
4056   //    Exit.
4057   //
4058   //  Go to slow path.
4059 
4060   const bool allow_shared_alloc =
4061     Universe::heap()->supports_inline_contig_alloc();
4062 
4063   const Register thread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
4064 #ifndef _LP64
4065   if (UseTLAB || allow_shared_alloc) {
4066     __ get_thread(thread);
4067   }
4068 #endif // _LP64
4069 
4070   if (UseTLAB) {
4071     __ movptr(rax, Address(thread, in_bytes(JavaThread::tlab_top_offset())));
4072     __ lea(rbx, Address(rax, rdx, Address::times_1));
4073     __ cmpptr(rbx, Address(thread, in_bytes(JavaThread::tlab_end_offset())));
4074     __ jcc(Assembler::above, slow_case);
4075     __ movptr(Address(thread, in_bytes(JavaThread::tlab_top_offset())), rbx);
4076     if (ZeroTLAB) {
4077       // the fields have been already cleared
4078       __ jmp(initialize_header);
4079     } else {
4080       // initialize both the header and fields
4081       __ jmp(initialize_object);
4082     }
4083   } else {
4084     // Allocation in the shared Eden, if allowed.
4085     //
4086     // rdx: instance size in bytes
4087     if (allow_shared_alloc) {
4088       ExternalAddress heap_top((address)Universe::heap()->top_addr());
4089       ExternalAddress heap_end((address)Universe::heap()->end_addr());
4090 
4091       Label retry;
4092       __ bind(retry);
4093       __ movptr(rax, heap_top);




4053   //
4054   //  If TLAB is enabled OR inline contiguous is enabled:
4055   //    Initialize the allocation.
4056   //    Exit.
4057   //
4058   //  Go to slow path.
4059 
4060   const bool allow_shared_alloc =
4061     Universe::heap()->supports_inline_contig_alloc();
4062 
4063   const Register thread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
4064 #ifndef _LP64
4065   if (UseTLAB || allow_shared_alloc) {
4066     __ get_thread(thread);
4067   }
4068 #endif // _LP64
4069 
4070   if (UseTLAB) {
4071     __ movptr(rax, Address(thread, in_bytes(JavaThread::tlab_top_offset())));
4072     __ lea(rbx, Address(rax, rdx, Address::times_1));
4073     __ cmpptr(rbx, Address(thread, in_bytes(JavaThread::tlab_current_end_offset())));
4074     __ jcc(Assembler::above, slow_case);
4075     __ movptr(Address(thread, in_bytes(JavaThread::tlab_top_offset())), rbx);
4076     if (ZeroTLAB) {
4077       // the fields have been already cleared
4078       __ jmp(initialize_header);
4079     } else {
4080       // initialize both the header and fields
4081       __ jmp(initialize_object);
4082     }
4083   } else {
4084     // Allocation in the shared Eden, if allowed.
4085     //
4086     // rdx: instance size in bytes
4087     if (allow_shared_alloc) {
4088       ExternalAddress heap_top((address)Universe::heap()->top_addr());
4089       ExternalAddress heap_end((address)Universe::heap()->end_addr());
4090 
4091       Label retry;
4092       __ bind(retry);
4093       __ movptr(rax, heap_top);


< prev index next >