hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
changeset 44315 1e2f842b0c96
parent 43947 a52ee13998f3
child 44738 11431bbc9549
child 46369 3bf4544bec14
equal deleted inserted replaced
44314:30ae899b9eca 44315:1e2f842b0c96
  1538       }
  1538       }
  1539       if (profile_return() && x->type()->is_object_kind()) {
  1539       if (profile_return() && x->type()->is_object_kind()) {
  1540         ciMethod* caller = state()->scope()->method();
  1540         ciMethod* caller = state()->scope()->method();
  1541         ciMethodData* md = caller->method_data_or_null();
  1541         ciMethodData* md = caller->method_data_or_null();
  1542         ciProfileData* data = md->bci_to_data(invoke_bci);
  1542         ciProfileData* data = md->bci_to_data(invoke_bci);
  1543         if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
  1543         if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
  1544           bool has_return = data->is_CallTypeData() ? ((ciCallTypeData*)data)->has_return() : ((ciVirtualCallTypeData*)data)->has_return();
  1544           bool has_return = data->is_CallTypeData() ? ((ciCallTypeData*)data)->has_return() : ((ciVirtualCallTypeData*)data)->has_return();
  1545           // May not be true in case of an inlined call through a method handle intrinsic.
  1545           // May not be true in case of an inlined call through a method handle intrinsic.
  1546           if (has_return) {
  1546           if (has_return) {
  1547             profile_return_type(x, method(), caller, invoke_bci);
  1547             profile_return_type(x, method(), caller, invoke_bci);
  1548           }
  1548           }
  1756   int n = 0;
  1756   int n = 0;
  1757   bool has_receiver = may_have_receiver && Bytecodes::has_receiver(method()->java_code_at_bci(bci()));
  1757   bool has_receiver = may_have_receiver && Bytecodes::has_receiver(method()->java_code_at_bci(bci()));
  1758   start = has_receiver ? 1 : 0;
  1758   start = has_receiver ? 1 : 0;
  1759   if (profile_arguments()) {
  1759   if (profile_arguments()) {
  1760     ciProfileData* data = method()->method_data()->bci_to_data(bci());
  1760     ciProfileData* data = method()->method_data()->bci_to_data(bci());
  1761     if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
  1761     if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
  1762       n = data->is_CallTypeData() ? data->as_CallTypeData()->number_of_arguments() : data->as_VirtualCallTypeData()->number_of_arguments();
  1762       n = data->is_CallTypeData() ? data->as_CallTypeData()->number_of_arguments() : data->as_VirtualCallTypeData()->number_of_arguments();
  1763     }
  1763     }
  1764   }
  1764   }
  1765   // If we are inlining then we need to collect arguments to profile parameters for the target
  1765   // If we are inlining then we need to collect arguments to profile parameters for the target
  1766   if (profile_parameters() && target != NULL) {
  1766   if (profile_parameters() && target != NULL) {
  4347   if (invoke_bci < 0) {
  4347   if (invoke_bci < 0) {
  4348     invoke_bci = bci();
  4348     invoke_bci = bci();
  4349   }
  4349   }
  4350   ciMethodData* md = m->method_data_or_null();
  4350   ciMethodData* md = m->method_data_or_null();
  4351   ciProfileData* data = md->bci_to_data(invoke_bci);
  4351   ciProfileData* data = md->bci_to_data(invoke_bci);
  4352   if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
  4352   if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
  4353     append(new ProfileReturnType(m , invoke_bci, callee, ret));
  4353     append(new ProfileReturnType(m , invoke_bci, callee, ret));
  4354   }
  4354   }
  4355 }
  4355 }
  4356 
  4356 
  4357 void GraphBuilder::profile_invocation(ciMethod* callee, ValueStack* state) {
  4357 void GraphBuilder::profile_invocation(ciMethod* callee, ValueStack* state) {