< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page
rev 49643 : [mq]: heap8
rev 49649 : [mq]: heap14


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




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


< prev index next >