Merge

Tue, 11 Jan 2011 17:50:26 -0500

author
phh
date
Tue, 11 Jan 2011 17:50:26 -0500
changeset 2448
0ca32cc95d7b
parent 2446
db2b0f8c1cef
parent 2447
5577848f5923
child 2449
8f8dfba37802

Merge

     1.1 --- a/src/cpu/sparc/vm/assembler_sparc.cpp	Tue Jan 11 10:06:00 2011 -0500
     1.2 +++ b/src/cpu/sparc/vm/assembler_sparc.cpp	Tue Jan 11 17:50:26 2011 -0500
     1.3 @@ -4104,7 +4104,7 @@
     1.4  
     1.5    ld_ptr(G2_thread, in_bytes(JavaThread::tlab_start_offset()), t1);
     1.6    sub(top, t1, t1); // size of tlab's allocated portion
     1.7 -  incr_allocated_bytes(t1, 0, t2);
     1.8 +  incr_allocated_bytes(t1, t2, t3);
     1.9  
    1.10    // refill the tlab with an eden allocation
    1.11    bind(do_refill);
    1.12 @@ -4138,19 +4138,14 @@
    1.13    delayed()->nop();
    1.14  }
    1.15  
    1.16 -void MacroAssembler::incr_allocated_bytes(Register var_size_in_bytes,
    1.17 -                                          int con_size_in_bytes,
    1.18 -                                          Register t1) {
    1.19 +void MacroAssembler::incr_allocated_bytes(RegisterOrConstant size_in_bytes,
    1.20 +                                          Register t1, Register t2) {
    1.21    // Bump total bytes allocated by this thread
    1.22    assert(t1->is_global(), "must be global reg"); // so all 64 bits are saved on a context switch
    1.23 -  assert_different_registers(var_size_in_bytes, t1);
    1.24 +  assert_different_registers(size_in_bytes.register_or_noreg(), t1, t2);
    1.25    // v8 support has gone the way of the dodo
    1.26    ldx(G2_thread, in_bytes(JavaThread::allocated_bytes_offset()), t1);
    1.27 -  if (var_size_in_bytes->is_valid()) {
    1.28 -    add(t1, var_size_in_bytes, t1);
    1.29 -  } else {
    1.30 -    add(t1, con_size_in_bytes, t1);
    1.31 -  }
    1.32 +  add(t1, ensure_simm13_or_reg(size_in_bytes, t2), t1);
    1.33    stx(t1, G2_thread, in_bytes(JavaThread::allocated_bytes_offset()));
    1.34  }
    1.35  
     2.1 --- a/src/cpu/sparc/vm/assembler_sparc.hpp	Tue Jan 11 10:06:00 2011 -0500
     2.2 +++ b/src/cpu/sparc/vm/assembler_sparc.hpp	Tue Jan 11 17:50:26 2011 -0500
     2.3 @@ -2389,7 +2389,8 @@
     2.4      Label&   slow_case                 // continuation point if fast allocation fails
     2.5    );
     2.6    void tlab_refill(Label& retry_tlab, Label& try_eden, Label& slow_case);
     2.7 -  void incr_allocated_bytes(Register var_size_in_bytes, int con_size_in_bytes, Register t1);
     2.8 +  void incr_allocated_bytes(RegisterOrConstant size_in_bytes,
     2.9 +                            Register t1, Register t2);
    2.10  
    2.11    // interface method calling
    2.12    void lookup_interface_method(Register recv_klass,
     3.1 --- a/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Tue Jan 11 10:06:00 2011 -0500
     3.2 +++ b/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Tue Jan 11 17:50:26 2011 -0500
     3.3 @@ -170,11 +170,13 @@
     3.4    Register t2,                         // temp register
     3.5    Label&   slow_case                   // continuation point if fast allocation fails
     3.6  ) {
     3.7 +  RegisterOrConstant size_in_bytes = var_size_in_bytes->is_valid()
     3.8 +    ? RegisterOrConstant(var_size_in_bytes) : RegisterOrConstant(con_size_in_bytes);
     3.9    if (UseTLAB) {
    3.10      tlab_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);
    3.11    } else {
    3.12      eden_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, t2, slow_case);
    3.13 -    incr_allocated_bytes(var_size_in_bytes, con_size_in_bytes, t1);
    3.14 +    incr_allocated_bytes(size_in_bytes, t1, t2);
    3.15    }
    3.16  }
    3.17  
     4.1 --- a/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Tue Jan 11 10:06:00 2011 -0500
     4.2 +++ b/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Tue Jan 11 17:50:26 2011 -0500
     4.3 @@ -461,7 +461,7 @@
     4.4            // get the instance size
     4.5            __ ld(G5_klass, klassOopDesc::header_size() * HeapWordSize + Klass::layout_helper_offset_in_bytes(), G1_obj_size);
     4.6            __ eden_allocate(O0_obj, G1_obj_size, 0, G3_t1, G4_t2, slow_path);
     4.7 -          __ incr_allocated_bytes(G1_obj_size, 0, G3_t1);
     4.8 +          __ incr_allocated_bytes(G1_obj_size, G3_t1, G4_t2);
     4.9  
    4.10            __ initialize_object(O0_obj, G5_klass, G1_obj_size, 0, G3_t1, G4_t2);
    4.11            __ verify_oop(O0_obj);
    4.12 @@ -577,7 +577,7 @@
    4.13            __ and3(G1_arr_size, ~MinObjAlignmentInBytesMask, G1_arr_size);
    4.14  
    4.15            __ eden_allocate(O0_obj, G1_arr_size, 0, G3_t1, O1_t2, slow_path);  // preserves G1_arr_size
    4.16 -          __ incr_allocated_bytes(G1_arr_size, 0, G3_t1);
    4.17 +          __ incr_allocated_bytes(G1_arr_size, G3_t1, O1_t2);
    4.18  
    4.19            __ initialize_header(O0_obj, G5_klass, G4_length, G3_t1, O1_t2);
    4.20            __ ldub(klass_lh, G3_t1, klass_lh_header_size_offset);
     5.1 --- a/src/cpu/sparc/vm/templateTable_sparc.cpp	Tue Jan 11 10:06:00 2011 -0500
     5.2 +++ b/src/cpu/sparc/vm/templateTable_sparc.cpp	Tue Jan 11 17:50:26 2011 -0500
     5.3 @@ -3447,7 +3447,8 @@
     5.4      __ delayed()->nop();
     5.5  
     5.6      // bump total bytes allocated by this thread
     5.7 -    __ incr_allocated_bytes(Roffset, 0, G1_scratch);
     5.8 +    // RoldTopValue and RtopAddr are dead, so can use G1 and G3
     5.9 +    __ incr_allocated_bytes(Roffset, G1_scratch, G3_scratch);
    5.10    }
    5.11  
    5.12    if (UseTLAB || Universe::heap()->supports_inline_contig_alloc()) {

mercurial