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 5462 : 8026251: New type profiling points: parameters to methods
Summary: x86 interpreter and c1 type profiling for parameters on method entries
Reviewed-by:

*** 41,50 **** --- 41,51 ---- class ciArrayData; class ciMultiBranchData; class ciArgInfoData; class ciCallTypeData; class ciVirtualCallTypeData; + class ciParametersTypeData; typedef ProfileData ciProfileData; class ciBitData : public BitData { public:
*** 122,132 **** 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()); --- 123,133 ---- ciCallTypeData(DataLayout* layout) : CallTypeData(layout) {} ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)CallTypeData::args(); } ciReturnTypeEntry* ret() const { return (ciReturnTypeEntry*)CallTypeData::ret(); } ! void translate_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());
*** 288,297 **** --- 289,317 ---- class ciArgInfoData : public ArgInfoData { public: ciArgInfoData(DataLayout* layout) : ArgInfoData(layout) {}; }; + class ciParametersTypeData : public ParametersTypeData { + public: + ciParametersTypeData(DataLayout* layout) : ParametersTypeData(layout) {} + + virtual void translate_from(const ProfileData* data) { + parameters()->translate_type_data_from(data->as_ParametersTypeData()->parameters()); + } + + ciTypeStackSlotEntries* parameters() const { return (ciTypeStackSlotEntries*)ParametersTypeData::parameters(); } + + ciKlass* valid_parameter_type(int i) const { + return parameters()->valid_type(i); + } + + #ifndef PRODUCT + void print_data_on(outputStream* st) const; + #endif + }; + // ciMethodData // // This class represents a MethodData* in the HotSpot virtual // machine.
*** 333,342 **** --- 353,366 ---- int _backedge_counter; // Coherent snapshot of original header. MethodData _orig; + // Dedicated area dedicated to parameters. Null if no parameter + // profiling for this method. + DataLayout* _parameters; + ciMethodData(MethodData* md); ciMethodData(); // Accessors int data_size() const { return _data_size; }
*** 401,410 **** --- 425,435 ---- // 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_parameter_type(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).
*** 465,474 **** --- 490,503 ---- bool is_arg_local(int i) const; bool is_arg_stack(int i) const; bool is_arg_returned(int i) const; uint arg_modified(int arg) const; + ciParametersTypeData* parameters_type_data() const { + return _parameters != NULL ? new ciParametersTypeData(_parameters) : NULL; + } + // Code generation helper ByteSize offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data); int byte_offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data) { return in_bytes(offset_of_slot(data, slot_offset_in_data)); } #ifndef PRODUCT
src/share/vm/ci/ciMethodData.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File