src/share/vm/ci/ciMethodData.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/ci/ciMethodData.hpp
src/share/vm/ci/ciMethodData.hpp
Print this page
rev 5400 : 8023657: New type profiling points: arguments to call
Summary: x86 interpreter and c1 type profiling for arguments at calls
Reviewed-by: kvn, twisti
rev 5401 : 8026054: New type profiling points: type of return values at calls
Summary: x86 interpreter and c1 type profiling for return values at calls
Reviewed-by:
rev 5402 : imported patch kvn
*** 102,125 ****
#ifndef PRODUCT
void print_data_on(outputStream* st) const;
#endif
};
class ciCallTypeData : public CallTypeData {
public:
ciCallTypeData(DataLayout* layout) : CallTypeData(layout) {}
ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)CallTypeData::args(); }
! virtual void translate_from(const ProfileData* data) {
args()->translate_type_data_from(data->as_CallTypeData()->args());
}
ciKlass* valid_argument_type(int i) const {
return args()->valid_type(i);
}
#ifndef PRODUCT
void print_data_on(outputStream* st) const;
#endif
};
--- 102,160 ----
#ifndef PRODUCT
void print_data_on(outputStream* st) const;
#endif
};
+ class ciReturnTypeEntry : public ReturnTypeEntry, ciTypeEntries {
+ public:
+ void translate_type_data_from(const ReturnTypeEntry* ret);
+
+ ciKlass* valid_type() const {
+ return valid_ciklass(type());
+ }
+
+ #ifndef PRODUCT
+ void print_data_on(outputStream* st) const;
+ #endif
+ };
+
class ciCallTypeData : public CallTypeData {
public:
ciCallTypeData(DataLayout* layout) : CallTypeData(layout) {}
ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)CallTypeData::args(); }
+ ciReturnTypeEntry* ret() const { return (ciReturnTypeEntry*)CallTypeData::ret(); }
! void translate_type_data_from(const ProfileData* data) {
! if (has_arguments()) {
args()->translate_type_data_from(data->as_CallTypeData()->args());
}
+ if (has_return()) {
+ ret()->translate_type_data_from(data->as_CallTypeData()->ret());
+ }
+ }
+
+ intptr_t argument_type(int i) const {
+ assert(has_arguments(), "no arg type profiling data");
+ return args()->type(i);
+ }
ciKlass* valid_argument_type(int i) const {
+ assert(has_arguments(), "no arg type profiling data");
return args()->valid_type(i);
}
+ intptr_t return_type() const {
+ assert(has_return(), "no ret type profiling data");
+ return ret()->type();
+ }
+
+ ciKlass* valid_return_type() const {
+ assert(has_return(), "no ret type profiling data");
+ return ret()->valid_type();
+ }
+
#ifndef PRODUCT
void print_data_on(outputStream* st) const;
#endif
};
*** 177,210 ****
class ciVirtualCallTypeData : public VirtualCallTypeData {
private:
// Fake multiple inheritance... It's a ciReceiverTypeData also.
ciReceiverTypeData* rtd_super() const { return (ciReceiverTypeData*) this; }
-
public:
ciVirtualCallTypeData(DataLayout* layout) : VirtualCallTypeData(layout) {}
- ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)VirtualCallTypeData::args(); }
-
void set_receiver(uint row, ciKlass* recv) {
rtd_super()->set_receiver(row, recv);
}
ciKlass* receiver(uint row) const {
return rtd_super()->receiver(row);
}
// Copy & translate from oop based VirtualCallData
virtual void translate_from(const ProfileData* data) {
rtd_super()->translate_receiver_data_from(data);
args()->translate_type_data_from(data->as_VirtualCallTypeData()->args());
}
ciKlass* valid_argument_type(int i) const {
return args()->valid_type(i);
}
#ifndef PRODUCT
void print_data_on(outputStream* st) const;
#endif
};
--- 212,266 ----
class ciVirtualCallTypeData : public VirtualCallTypeData {
private:
// Fake multiple inheritance... It's a ciReceiverTypeData also.
ciReceiverTypeData* rtd_super() const { return (ciReceiverTypeData*) this; }
public:
ciVirtualCallTypeData(DataLayout* layout) : VirtualCallTypeData(layout) {}
void set_receiver(uint row, ciKlass* recv) {
rtd_super()->set_receiver(row, recv);
}
ciKlass* receiver(uint row) const {
return rtd_super()->receiver(row);
}
+ ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)VirtualCallTypeData::args(); }
+ ciReturnTypeEntry* ret() const { return (ciReturnTypeEntry*)VirtualCallTypeData::ret(); }
+
// Copy & translate from oop based VirtualCallData
virtual void translate_from(const ProfileData* data) {
rtd_super()->translate_receiver_data_from(data);
+ if (has_arguments()) {
args()->translate_type_data_from(data->as_VirtualCallTypeData()->args());
}
+ if (has_return()) {
+ ret()->translate_type_data_from(data->as_VirtualCallTypeData()->ret());
+ }
+ }
+
+ intptr_t argument_type(int i) const {
+ assert(has_arguments(), "no arg type profiling data");
+ return args()->type(i);
+ }
ciKlass* valid_argument_type(int i) const {
+ assert(has_arguments(), "no arg type profiling data");
return args()->valid_type(i);
}
+ intptr_t return_type() const {
+ assert(has_return(), "no ret type profiling data");
+ return ret()->type();
+ }
+
+ ciKlass* valid_return_type() const {
+ assert(has_return(), "no ret type profiling data");
+ return ret()->valid_type();
+ }
+
#ifndef PRODUCT
void print_data_on(outputStream* st) const;
#endif
};
*** 345,354 ****
--- 401,411 ----
// Again, this is used to determine if a method is trivial.
void set_compilation_stats(short loops, short blocks);
// If the compiler finds a profiled type that is known statically
// for sure, set it in the MethodData
void set_argument_type(int bci, int i, ciKlass* k);
+ void set_return_type(int bci, ciKlass* k);
void load_data();
// Convert a dp (data pointer) to a di (data index).
int dp_to_di(address dp) {
src/share/vm/ci/ciMethodData.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File