< prev index next >

src/hotspot/cpu/sparc/templateTable_sparc.cpp

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


3275   //    If fails due to heap end, go to slow path.
3276   //
3277   //  If TLAB is enabled OR inline contiguous is enabled:
3278   //    Initialize the allocation.
3279   //    Exit.
3280   //
3281   //  Go to slow path.
3282 
3283   const bool allow_shared_alloc =
3284     Universe::heap()->supports_inline_contig_alloc();
3285 
3286   if(UseTLAB) {
3287     Register RoldTopValue = RallocatedObject;
3288     Register RtlabWasteLimitValue = G3_scratch;
3289     Register RnewTopValue = G1_scratch;
3290     Register RendValue = Rscratch;
3291     Register RfreeValue = RnewTopValue;
3292 
3293     // check if we can allocate in the TLAB
3294     __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_top_offset()), RoldTopValue); // sets up RalocatedObject
3295     __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_current_end_offset()), RendValue);
3296     __ add(RoldTopValue, Roffset, RnewTopValue);
3297 
3298     // if there is enough space, we do not CAS and do not clear
3299     __ cmp(RnewTopValue, RendValue);
3300     if(ZeroTLAB) {
3301       // the fields have already been cleared
3302       __ brx(Assembler::lessEqualUnsigned, true, Assembler::pt, initialize_header);
3303     } else {
3304       // initialize both the header and fields
3305       __ brx(Assembler::lessEqualUnsigned, true, Assembler::pt, initialize_object);
3306     }
3307     __ delayed()->st_ptr(RnewTopValue, G2_thread, in_bytes(JavaThread::tlab_top_offset()));
3308 
3309     // Allocation does not fit in the TLAB.
3310     __ ba_short(slow_case);
3311   } else {
3312     // Allocation in the shared Eden
3313     if (allow_shared_alloc) {
3314       Register RoldTopValue = G1_scratch;
3315       Register RtopAddr = G3_scratch;




3275   //    If fails due to heap end, go to slow path.
3276   //
3277   //  If TLAB is enabled OR inline contiguous is enabled:
3278   //    Initialize the allocation.
3279   //    Exit.
3280   //
3281   //  Go to slow path.
3282 
3283   const bool allow_shared_alloc =
3284     Universe::heap()->supports_inline_contig_alloc();
3285 
3286   if(UseTLAB) {
3287     Register RoldTopValue = RallocatedObject;
3288     Register RtlabWasteLimitValue = G3_scratch;
3289     Register RnewTopValue = G1_scratch;
3290     Register RendValue = Rscratch;
3291     Register RfreeValue = RnewTopValue;
3292 
3293     // check if we can allocate in the TLAB
3294     __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_top_offset()), RoldTopValue); // sets up RalocatedObject
3295     __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_fast_path_end_offset()), RendValue);
3296     __ add(RoldTopValue, Roffset, RnewTopValue);
3297 
3298     // if there is enough space, we do not CAS and do not clear
3299     __ cmp(RnewTopValue, RendValue);
3300     if(ZeroTLAB) {
3301       // the fields have already been cleared
3302       __ brx(Assembler::lessEqualUnsigned, true, Assembler::pt, initialize_header);
3303     } else {
3304       // initialize both the header and fields
3305       __ brx(Assembler::lessEqualUnsigned, true, Assembler::pt, initialize_object);
3306     }
3307     __ delayed()->st_ptr(RnewTopValue, G2_thread, in_bytes(JavaThread::tlab_top_offset()));
3308 
3309     // Allocation does not fit in the TLAB.
3310     __ ba_short(slow_case);
3311   } else {
3312     // Allocation in the shared Eden
3313     if (allow_shared_alloc) {
3314       Register RoldTopValue = G1_scratch;
3315       Register RtopAddr = G3_scratch;


< prev index next >