src/share/vm/ci/ciMethodData.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/ci/ciMethodData.cpp
src/share/vm/ci/ciMethodData.cpp
Print this page
rev 5468 : 8026251: New type profiling points: parameters to methods
Summary: x86 interpreter and c1 type profiling for parameters on method entries
Reviewed-by:
*** 51,60 ****
--- 51,61 ----
// Set an initial hint. Don't use set_hint_di() because
// first_di() may be out of bounds if data_size is 0.
_hint_di = first_di();
// Initialize the escape information (to "don't know.");
_eflags = _arg_local = _arg_stack = _arg_returned = 0;
+ _parameters = NULL;
}
// ------------------------------------------------------------------
// ciMethodData::ciMethodData
//
*** 72,81 ****
--- 73,83 ----
// Set an initial hint. Don't use set_hint_di() because
// first_di() may be out of bounds if data_size is 0.
_hint_di = first_di();
// Initialize the escape information (to "don't know.");
_eflags = _arg_local = _arg_stack = _arg_returned = 0;
+ _parameters = NULL;
}
void ciMethodData::load_data() {
MethodData* mdo = get_MethodData();
if (mdo == NULL) {
*** 106,115 ****
--- 108,123 ----
while (is_valid(ci_data)) {
ci_data->translate_from(data);
ci_data = next_data(ci_data);
data = mdo->next_data(data);
}
+ if (mdo->parameters_type_data() != NULL) {
+ _parameters = data_layout_at(mdo->parameters_type_data_di());
+ ciParametersTypeData* parameters = new ciParametersTypeData(_parameters);
+ parameters->translate_from(mdo->parameters_type_data());
+ }
+
// Note: Extra data are all BitData, and do not need translation.
_current_mileage = MethodData::mileage_of(mdo->method());
_invocation_counter = mdo->invocation_count();
_backedge_counter = mdo->backedge_count();
_state = mdo->is_mature()? mature_state: immature_state;
*** 180,189 ****
--- 188,199 ----
return new ciArgInfoData(data_layout);
case DataLayout::call_type_data_tag:
return new ciCallTypeData(data_layout);
case DataLayout::virtual_call_type_data_tag:
return new ciVirtualCallTypeData(data_layout);
+ case DataLayout::parameters_type_data_tag:
+ return new ciParametersTypeData(data_layout);
};
}
// Iteration over data.
ciProfileData* ciMethodData::next_data(ciProfileData* current) {
*** 316,325 ****
--- 326,343 ----
data->as_VirtualCallTypeData()->set_argument_type(i, k->get_Klass());
}
}
}
+ void ciMethodData::set_parameter_type(int i, ciKlass* k) {
+ VM_ENTRY_MARK;
+ MethodData* mdo = get_MethodData();
+ if (mdo != NULL) {
+ mdo->parameters_type_data()->set_type(i, k->get_Klass());
+ }
+ }
+
void ciMethodData::set_return_type(int bci, ciKlass* k) {
VM_ENTRY_MARK;
MethodData* mdo = get_MethodData();
if (mdo != NULL) {
ProfileData* data = mdo->bci_to_data(bci);
*** 603,608 ****
--- 621,631 ----
tab(st, true);
st->print("return type");
ret()->print_data_on(st);
}
}
+
+ void ciParametersTypeData::print_data_on(outputStream* st) const {
+ st->print_cr("Parametertypes");
+ parameters()->print_data_on(st);
+ }
#endif
src/share/vm/ci/ciMethodData.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File