hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
changeset 4754 8aef16f24e16
parent 4752 67a506670cd0
child 4892 e977b527544a
child 4764 d15bb22d4d39
equal deleted inserted replaced
4753:9e7bcf214f71 4754:8aef16f24e16
  3207   assert(data->is_CounterData(), "need CounterData for calls");
  3207   assert(data->is_CounterData(), "need CounterData for calls");
  3208   assert(op->mdo()->is_single_cpu(),  "mdo must be allocated");
  3208   assert(op->mdo()->is_single_cpu(),  "mdo must be allocated");
  3209   Register mdo  = op->mdo()->as_register();
  3209   Register mdo  = op->mdo()->as_register();
  3210   __ movoop(mdo, md->constant_encoding());
  3210   __ movoop(mdo, md->constant_encoding());
  3211   Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
  3211   Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
  3212   __ addl(counter_addr, DataLayout::counter_increment);
       
  3213   Bytecodes::Code bc = method->java_code_at_bci(bci);
  3212   Bytecodes::Code bc = method->java_code_at_bci(bci);
  3214   // Perform additional virtual call profiling for invokevirtual and
  3213   // Perform additional virtual call profiling for invokevirtual and
  3215   // invokeinterface bytecodes
  3214   // invokeinterface bytecodes
  3216   if ((bc == Bytecodes::_invokevirtual || bc == Bytecodes::_invokeinterface) &&
  3215   if ((bc == Bytecodes::_invokevirtual || bc == Bytecodes::_invokeinterface) &&
  3217       Tier1ProfileVirtualCalls) {
  3216       Tier1ProfileVirtualCalls) {
  3274         Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
  3273         Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
  3275         __ cmpptr(recv_addr, (int32_t)NULL_WORD);
  3274         __ cmpptr(recv_addr, (int32_t)NULL_WORD);
  3276         __ jcc(Assembler::notEqual, next_test);
  3275         __ jcc(Assembler::notEqual, next_test);
  3277         __ movptr(recv_addr, recv);
  3276         __ movptr(recv_addr, recv);
  3278         __ movl(Address(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i))), DataLayout::counter_increment);
  3277         __ movl(Address(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i))), DataLayout::counter_increment);
  3279         if (i < (VirtualCallData::row_limit() - 1)) {
  3278         __ jmp(update_done);
  3280           __ jmp(update_done);
       
  3281         }
       
  3282         __ bind(next_test);
  3279         __ bind(next_test);
  3283       }
  3280       }
       
  3281       // Receiver did not match any saved receiver and there is no empty row for it.
       
  3282       // Increment total counter to indicate polimorphic case.
       
  3283       __ addl(counter_addr, DataLayout::counter_increment);
  3284 
  3284 
  3285       __ bind(update_done);
  3285       __ bind(update_done);
  3286     }
  3286     }
       
  3287   } else {
       
  3288     // Static call
       
  3289     __ addl(counter_addr, DataLayout::counter_increment);
  3287   }
  3290   }
  3288 }
  3291 }
  3289 
  3292 
  3290 
  3293 
  3291 void LIR_Assembler::emit_delay(LIR_OpDelay*) {
  3294 void LIR_Assembler::emit_delay(LIR_OpDelay*) {