src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp

changeset 1692
7b4415a18c8a
parent 1651
7f8790caccb0
parent 1686
576e77447e3c
child 1730
3cf667df43ef
     1.1 --- a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Thu Feb 11 10:48:10 2010 -0800
     1.2 +++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Fri Feb 12 15:27:36 2010 -0800
     1.3 @@ -2730,9 +2730,6 @@
     1.4    }
     1.5  
     1.6    Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias);
     1.7 -  __ lduw(counter_addr, tmp1);
     1.8 -  __ add(tmp1, DataLayout::counter_increment, tmp1);
     1.9 -  __ stw(tmp1, counter_addr);
    1.10    Bytecodes::Code bc = method->java_code_at_bci(bci);
    1.11    // Perform additional virtual call profiling for invokevirtual and
    1.12    // invokeinterface bytecodes
    1.13 @@ -2822,15 +2819,23 @@
    1.14          __ set(DataLayout::counter_increment, tmp1);
    1.15          __ st_ptr(tmp1, mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
    1.16                    mdo_offset_bias);
    1.17 -        if (i < (VirtualCallData::row_limit() - 1)) {
    1.18 -          __ br(Assembler::always, false, Assembler::pt, update_done);
    1.19 -          __ delayed()->nop();
    1.20 -        }
    1.21 +        __ br(Assembler::always, false, Assembler::pt, update_done);
    1.22 +        __ delayed()->nop();
    1.23          __ bind(next_test);
    1.24        }
    1.25 +      // Receiver did not match any saved receiver and there is no empty row for it.
    1.26 +      // Increment total counter to indicate polymorphic case.
    1.27 +      __ lduw(counter_addr, tmp1);
    1.28 +      __ add(tmp1, DataLayout::counter_increment, tmp1);
    1.29 +      __ stw(tmp1, counter_addr);
    1.30  
    1.31        __ bind(update_done);
    1.32      }
    1.33 +  } else {
    1.34 +    // Static call
    1.35 +    __ lduw(counter_addr, tmp1);
    1.36 +    __ add(tmp1, DataLayout::counter_increment, tmp1);
    1.37 +    __ stw(tmp1, counter_addr);
    1.38    }
    1.39  }
    1.40  

mercurial