comparison src/share/vm/runtime/deoptimization.cpp @ 12356:359f7e70ae7f

Reduce HotSpot diff and fix previous merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 11 Oct 2013 15:41:33 +0200
parents cefad50507d8
children b2882f4ab612
comparison
equal deleted inserted replaced
12355:cefad50507d8 12356:359f7e70ae7f
866 ShouldNotReachHere(); 866 ShouldNotReachHere();
867 } 867 }
868 index++; 868 index++;
869 } 869 }
870 } 870 }
871
871 872
872 // restore fields of an eliminated object array 873 // restore fields of an eliminated object array
873 void Deoptimization::reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj) { 874 void Deoptimization::reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj) {
874 for (int i = 0; i < sv->field_size(); i++) { 875 for (int i = 0; i < sv->field_size(); i++) {
875 StackValue* value = StackValue::create_stack_value(fr, reg_map, sv->field_at(i)); 876 StackValue* value = StackValue::create_stack_value(fr, reg_map, sv->field_at(i));
1552 // to use the MDO to detect hot deoptimization points and control 1553 // to use the MDO to detect hot deoptimization points and control
1553 // aggressive optimization. 1554 // aggressive optimization.
1554 bool inc_recompile_count = false; 1555 bool inc_recompile_count = false;
1555 ProfileData* pdata = NULL; 1556 ProfileData* pdata = NULL;
1556 if (ProfileTraps && update_trap_state && trap_mdo != NULL) { 1557 if (ProfileTraps && update_trap_state && trap_mdo != NULL) {
1558 assert(trap_mdo == get_method_data(thread, profiled_method, false), "sanity");
1557 uint this_trap_count = 0; 1559 uint this_trap_count = 0;
1558 bool maybe_prior_trap = false; 1560 bool maybe_prior_trap = false;
1559 bool maybe_prior_recompile = false; 1561 bool maybe_prior_recompile = false;
1560 pdata = query_update_method_data(trap_mdo, trap_bci, reason, true, 1562 pdata = query_update_method_data(trap_mdo, trap_bci, reason, true,
1561 //outputs: 1563 //outputs:
1709 // a trap with the present reason , then this BCI is assumed 1711 // a trap with the present reason , then this BCI is assumed
1710 // (pessimistically) to be the culprit. 1712 // (pessimistically) to be the culprit.
1711 maybe_prior_trap = (prior_trap_count != 0); 1713 maybe_prior_trap = (prior_trap_count != 0);
1712 maybe_prior_recompile = (trap_mdo->decompile_count() != 0); 1714 maybe_prior_recompile = (trap_mdo->decompile_count() != 0);
1713 } 1715 }
1716 ProfileData* pdata = NULL;
1717
1714 1718
1715 // For reasons which are recorded per bytecode, we check per-BCI data. 1719 // For reasons which are recorded per bytecode, we check per-BCI data.
1716 ProfileData* pdata = NULL;
1717 DeoptReason per_bc_reason = reason_recorded_per_bytecode_if_any(reason); 1720 DeoptReason per_bc_reason = reason_recorded_per_bytecode_if_any(reason);
1718 assert(per_bc_reason != Reason_none || update_total_trap_count, "must be"); 1721 assert(per_bc_reason != Reason_none || update_total_trap_count, "must be");
1719 if (per_bc_reason != Reason_none) { 1722 if (per_bc_reason != Reason_none) {
1720 // Find the profile data for this BCI. If there isn't one, 1723 // Find the profile data for this BCI. If there isn't one,
1721 // try to allocate one from the MDO's set of spares. 1724 // try to allocate one from the MDO's set of spares.