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 5240 : 8023657: New type profiling points: arguments to call
Summary: x86 interpreter and c1 type profiling for arguments at calls
Reviewed-by:
*** 121,141 ****
ciReplay::initialize(this);
}
#endif
}
! void ciReceiverTypeData::translate_receiver_data_from(ProfileData* data) {
for (uint row = 0; row < row_limit(); row++) {
Klass* k = data->as_ReceiverTypeData()->receiver(row);
if (k != NULL) {
ciKlass* klass = CURRENT_ENV->get_klass(k);
set_receiver(row, klass);
}
}
}
// Get the data at an arbitrary (sort of) data index.
ciProfileData* ciMethodData::data_at(int data_index) {
if (out_of_bounds(data_index)) {
return NULL;
}
--- 121,148 ----
ciReplay::initialize(this);
}
#endif
}
! void ciReceiverTypeData::translate_receiver_data_from(const ProfileData* data) {
for (uint row = 0; row < row_limit(); row++) {
Klass* k = data->as_ReceiverTypeData()->receiver(row);
if (k != NULL) {
ciKlass* klass = CURRENT_ENV->get_klass(k);
set_receiver(row, klass);
}
}
}
+ void ciTypeStackSlotEntries::translate_type_data_from(const TypeStackSlotEntries* entries) {
+ for (int i = 0; i < number_of_arguments(); i++) {
+ intptr_t k = entries->type(i);
+ TypeStackSlotEntries::set_type(i, translate_klass(k));
+ }
+ }
+
// Get the data at an arbitrary (sort of) data index.
ciProfileData* ciMethodData::data_at(int data_index) {
if (out_of_bounds(data_index)) {
return NULL;
}
*** 162,171 ****
--- 169,182 ----
return new ciBranchData(data_layout);
case DataLayout::multi_branch_data_tag:
return new ciMultiBranchData(data_layout);
case DataLayout::arg_info_data_tag:
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);
};
}
// Iteration over data.
ciProfileData* ciMethodData::next_data(ciProfileData* current) {
*** 284,293 ****
--- 295,318 ----
if (mdo != NULL) {
mdo->set_would_profile(p);
}
}
+ void ciMethodData::set_argument_type(int bci, int i, ciKlass* k) {
+ VM_ENTRY_MARK;
+ MethodData* mdo = get_MethodData();
+ if (mdo != NULL) {
+ ProfileData* data = mdo->bci_to_data(bci);
+ if (data->is_CallTypeData()) {
+ data->as_CallTypeData()->set_argument_type(i, k->get_Klass());
+ } else {
+ assert(data->is_VirtualCallTypeData(), "no arguments!");
+ data->as_VirtualCallTypeData()->set_argument_type(i, k->get_Klass());
+ }
+ }
+ }
+
bool ciMethodData::has_escape_info() {
return eflag_set(MethodData::estimated);
}
void ciMethodData::set_eflag(MethodData::EscapeFlag f) {
*** 475,485 ****
st->fill_to(6);
data->print_data_on(st);
}
}
! void ciReceiverTypeData::print_receiver_data_on(outputStream* st) {
uint row;
int entries = 0;
for (row = 0; row < row_limit(); row++) {
if (receiver(row) != NULL) entries++;
}
--- 500,539 ----
st->fill_to(6);
data->print_data_on(st);
}
}
! void ciTypeEntries::print_ciklass(outputStream* st, intptr_t k) {
! if (TypeEntries::is_type_none(k)) {
! st->print("none");
! } else if (TypeEntries::is_type_unknown(k)) {
! st->print("unknown");
! } else {
! valid_ciklass(k)->print_name_on(st);
! }
! if (TypeEntries::was_null_seen(k)) {
! st->print(" (null seen)");
! }
! }
!
! void ciTypeStackSlotEntries::print_data_on(outputStream* st) const {
! _pd->tab(st, true);
! st->print("argument types");
! for (int i = 0; i < number_of_arguments(); i++) {
! _pd->tab(st);
! st->print("%d: stack (%u) ", i, stack_slot(i));
! print_ciklass(st, type(i));
! st->cr();
! }
! }
!
! void ciCallTypeData::print_data_on(outputStream* st) const {
! print_shared(st, "ciCallTypeData");
! args()->print_data_on(st);
! }
!
! void ciReceiverTypeData::print_receiver_data_on(outputStream* st) const {
uint row;
int entries = 0;
for (row = 0; row < row_limit(); row++) {
if (receiver(row) != NULL) entries++;
}
*** 491,505 ****
st->print_cr("(%u)", receiver_count(row));
}
}
}
! void ciReceiverTypeData::print_data_on(outputStream* st) {
print_shared(st, "ciReceiverTypeData");
print_receiver_data_on(st);
}
! void ciVirtualCallData::print_data_on(outputStream* st) {
print_shared(st, "ciVirtualCallData");
rtd_super()->print_receiver_data_on(st);
}
#endif
--- 545,565 ----
st->print_cr("(%u)", receiver_count(row));
}
}
}
! void ciReceiverTypeData::print_data_on(outputStream* st) const {
print_shared(st, "ciReceiverTypeData");
print_receiver_data_on(st);
}
! void ciVirtualCallData::print_data_on(outputStream* st) const {
print_shared(st, "ciVirtualCallData");
rtd_super()->print_receiver_data_on(st);
}
+
+ void ciVirtualCallTypeData::print_data_on(outputStream* st) const {
+ print_shared(st, "ciVirtualCallTypeData");
+ rtd_super()->print_receiver_data_on(st);
+ args()->print_data_on(st);
+ }
#endif
src/share/vm/ci/ciMethodData.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File