mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8026694: New type profiling points break compilation replay
Fixes compilation replay with new profiling points Reviewed-by: kvn, twisti
This commit is contained in:
parent
d7b76028a4
commit
7ef690b2c7
25 changed files with 1306 additions and 197 deletions
|
@ -851,11 +851,10 @@ private:
|
|||
return _base_off + stack_slot_local_offset(i);
|
||||
}
|
||||
|
||||
protected:
|
||||
const int _number_of_entries;
|
||||
|
||||
// offset of cell for type for entry i within ProfileData object
|
||||
int type_offset(int i) const {
|
||||
int type_offset_in_cells(int i) const {
|
||||
return _base_off + type_local_offset(i);
|
||||
}
|
||||
|
||||
|
@ -868,6 +867,8 @@ public:
|
|||
|
||||
void post_initialize(Symbol* signature, bool has_receiver, bool include_receiver);
|
||||
|
||||
int number_of_entries() const { return _number_of_entries; }
|
||||
|
||||
// offset of cell for stack slot for entry i within this block of cells for a TypeStackSlotEntries
|
||||
static int stack_slot_local_offset(int i) {
|
||||
return i * per_arg_cell_count + stack_slot_entry;
|
||||
|
@ -893,13 +894,13 @@ public:
|
|||
// type for entry i
|
||||
intptr_t type(int i) const {
|
||||
assert(i >= 0 && i < _number_of_entries, "oob");
|
||||
return _pd->intptr_at(type_offset(i));
|
||||
return _pd->intptr_at(type_offset_in_cells(i));
|
||||
}
|
||||
|
||||
// set type for entry i
|
||||
void set_type(int i, intptr_t k) {
|
||||
assert(i >= 0 && i < _number_of_entries, "oob");
|
||||
_pd->set_intptr_at(type_offset(i), k);
|
||||
_pd->set_intptr_at(type_offset_in_cells(i), k);
|
||||
}
|
||||
|
||||
static ByteSize per_arg_size() {
|
||||
|
@ -907,7 +908,11 @@ public:
|
|||
}
|
||||
|
||||
static int per_arg_count() {
|
||||
return per_arg_cell_count ;
|
||||
return per_arg_cell_count;
|
||||
}
|
||||
|
||||
ByteSize type_offset(int i) const {
|
||||
return DataLayout::cell_offset(type_offset_in_cells(i));
|
||||
}
|
||||
|
||||
// GC support
|
||||
|
@ -973,7 +978,7 @@ private:
|
|||
}
|
||||
|
||||
static int argument_type_local_offset(int i) {
|
||||
return header_cell_count() + TypeStackSlotEntries::type_local_offset(i);;
|
||||
return header_cell_count() + TypeStackSlotEntries::type_local_offset(i);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -1129,6 +1134,14 @@ public:
|
|||
return cell_offset(CounterData::static_cell_count()) + TypeEntriesAtCall::args_data_offset();
|
||||
}
|
||||
|
||||
ByteSize argument_type_offset(int i) {
|
||||
return _args.type_offset(i);
|
||||
}
|
||||
|
||||
ByteSize return_type_offset() {
|
||||
return _ret.type_offset();
|
||||
}
|
||||
|
||||
// GC support
|
||||
virtual void clean_weak_klass_links(BoolObjectClosure* is_alive_closure) {
|
||||
if (has_arguments()) {
|
||||
|
@ -1436,6 +1449,14 @@ public:
|
|||
return cell_offset(VirtualCallData::static_cell_count()) + TypeEntriesAtCall::args_data_offset();
|
||||
}
|
||||
|
||||
ByteSize argument_type_offset(int i) {
|
||||
return _args.type_offset(i);
|
||||
}
|
||||
|
||||
ByteSize return_type_offset() {
|
||||
return _ret.type_offset();
|
||||
}
|
||||
|
||||
// GC support
|
||||
virtual void clean_weak_klass_links(BoolObjectClosure* is_alive_closure) {
|
||||
ReceiverTypeData::clean_weak_klass_links(is_alive_closure);
|
||||
|
@ -1926,7 +1947,7 @@ public:
|
|||
class SpeculativeTrapData : public ProfileData {
|
||||
protected:
|
||||
enum {
|
||||
method_offset,
|
||||
speculative_trap_method,
|
||||
speculative_trap_cell_count
|
||||
};
|
||||
public:
|
||||
|
@ -1946,11 +1967,15 @@ public:
|
|||
|
||||
// Direct accessor
|
||||
Method* method() const {
|
||||
return (Method*)intptr_at(method_offset);
|
||||
return (Method*)intptr_at(speculative_trap_method);
|
||||
}
|
||||
|
||||
void set_method(Method* m) {
|
||||
set_intptr_at(method_offset, (intptr_t)m);
|
||||
set_intptr_at(speculative_trap_method, (intptr_t)m);
|
||||
}
|
||||
|
||||
static ByteSize method_offset() {
|
||||
return cell_offset(speculative_trap_method);
|
||||
}
|
||||
|
||||
virtual void print_data_on(outputStream* st, const char* extra = NULL) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue