mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8026251: New type profiling points: parameters to methods
X86 interpreter and c1 type profiling for parameters on method entries Reviewed-by: kvn, twisti
This commit is contained in:
parent
4db165a8d7
commit
b94884a330
26 changed files with 750 additions and 430 deletions
|
@ -43,6 +43,7 @@ class ciMultiBranchData;
|
|||
class ciArgInfoData;
|
||||
class ciCallTypeData;
|
||||
class ciVirtualCallTypeData;
|
||||
class ciParametersTypeData;
|
||||
|
||||
typedef ProfileData ciProfileData;
|
||||
|
||||
|
@ -124,7 +125,7 @@ public:
|
|||
ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)CallTypeData::args(); }
|
||||
ciReturnTypeEntry* ret() const { return (ciReturnTypeEntry*)CallTypeData::ret(); }
|
||||
|
||||
void translate_type_data_from(const ProfileData* data) {
|
||||
void translate_from(const ProfileData* data) {
|
||||
if (has_arguments()) {
|
||||
args()->translate_type_data_from(data->as_CallTypeData()->args());
|
||||
}
|
||||
|
@ -290,6 +291,25 @@ 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
|
||||
|
@ -335,6 +355,10 @@ private:
|
|||
// 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();
|
||||
|
||||
|
@ -403,6 +427,7 @@ public:
|
|||
// 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();
|
||||
|
@ -467,6 +492,10 @@ public:
|
|||
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)); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue