1.1 --- a/src/cpu/mips/vm/c1_Runtime1_mips.cpp Mon Aug 06 13:27:17 2018 +0800 1.2 +++ b/src/cpu/mips/vm/c1_Runtime1_mips.cpp Fri Jul 27 15:17:45 2018 +0800 1.3 @@ -1071,11 +1071,20 @@ 1.4 __ jr(RA); 1.5 __ delayed()->nop(); 1.6 1.7 +#ifndef OPT_THREAD 1.8 + const Register thread = T8; 1.9 + __ get_thread(thread); 1.10 +#else 1.11 + const Register thread = TREG; 1.12 +#endif 1.13 + 1.14 __ bind(try_eden); 1.15 1.16 // get the instance size 1.17 __ lw(obj_size, klass, in_bytes(Klass::layout_helper_offset())); 1.18 __ eden_allocate(obj, obj_size, 0, t1, t2, slow_path); 1.19 + __ incr_allocated_bytes(thread, obj_size, 0); 1.20 + 1.21 __ initialize_object(obj, klass, obj_size, 0, t1, t2); 1.22 __ verify_oop(obj); 1.23 __ jr(RA); 1.24 @@ -1193,6 +1202,13 @@ 1.25 __ jr(RA); 1.26 __ delayed()->nop(); 1.27 1.28 +#ifndef OPT_THREAD 1.29 + const Register thread = T8; 1.30 + __ get_thread(thread); 1.31 +#else 1.32 + const Register thread = TREG; 1.33 +#endif 1.34 + 1.35 __ bind(try_eden); 1.36 // get the allocation size: (length << (layout_helper & 0x1F)) + header_size 1.37 __ lw(t1, klass, in_bytes(Klass::layout_helper_offset())); 1.38 @@ -1205,6 +1221,8 @@ 1.39 __ move(AT, ~MinObjAlignmentInBytesMask); 1.40 __ andr(arr_size, arr_size, AT); 1.41 __ eden_allocate(obj, arr_size, 0, t1, t2, slow_path); // preserves arr_size 1.42 + __ incr_allocated_bytes(thread, arr_size, 0); 1.43 + 1.44 __ initialize_header(obj, klass, length,t1,t2); 1.45 __ lbu(t1, Address(klass, in_bytes(Klass::layout_helper_offset()) 1.46 + (Klass::_lh_header_size_shift / BitsPerByte)));