mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8072008: Emit direct call instead of linkTo* for recursive indy/MH.invoke* calls
Reviewed-by: jrose, dlong, aph, forax
This commit is contained in:
parent
8c5da27f19
commit
d60a09e9c5
47 changed files with 1190 additions and 148 deletions
|
@ -392,6 +392,9 @@ class nmethod : public CodeBlob {
|
|||
int handler_table_size() const { return handler_table_end() - handler_table_begin(); }
|
||||
int nul_chk_table_size() const { return nul_chk_table_end() - nul_chk_table_begin(); }
|
||||
|
||||
int oops_count() const { assert(oops_size() % oopSize == 0, ""); return (oops_size() / oopSize) + 1; }
|
||||
int metadata_count() const { assert(metadata_size() % wordSize == 0, ""); return (metadata_size() / wordSize) + 1; }
|
||||
|
||||
int total_size () const;
|
||||
|
||||
void dec_hotness_counter() { _hotness_counter--; }
|
||||
|
@ -491,7 +494,7 @@ class nmethod : public CodeBlob {
|
|||
oop oop_at(int index) const { return index == 0 ? (oop) NULL: *oop_addr_at(index); }
|
||||
oop* oop_addr_at(int index) const { // for GC
|
||||
// relocation indexes are biased by 1 (because 0 is reserved)
|
||||
assert(index > 0 && index <= oops_size(), "must be a valid non-zero index");
|
||||
assert(index > 0 && index <= oops_count(), "must be a valid non-zero index");
|
||||
assert(!_oops_are_stale, "oops are stale");
|
||||
return &oops_begin()[index - 1];
|
||||
}
|
||||
|
@ -501,13 +504,15 @@ class nmethod : public CodeBlob {
|
|||
Metadata* metadata_at(int index) const { return index == 0 ? NULL: *metadata_addr_at(index); }
|
||||
Metadata** metadata_addr_at(int index) const { // for GC
|
||||
// relocation indexes are biased by 1 (because 0 is reserved)
|
||||
assert(index > 0 && index <= metadata_size(), "must be a valid non-zero index");
|
||||
assert(index > 0 && index <= metadata_count(), "must be a valid non-zero index");
|
||||
return &metadata_begin()[index - 1];
|
||||
}
|
||||
|
||||
void copy_values(GrowableArray<jobject>* oops);
|
||||
void copy_values(GrowableArray<Metadata*>* metadata);
|
||||
|
||||
Method* attached_method(address call_pc);
|
||||
|
||||
// Relocation support
|
||||
private:
|
||||
void fix_oop_relocations(address begin, address end, bool initialize_immediates);
|
||||
|
@ -696,6 +701,8 @@ public:
|
|||
void print_calls(outputStream* st) PRODUCT_RETURN;
|
||||
void print_handler_table() PRODUCT_RETURN;
|
||||
void print_nul_chk_table() PRODUCT_RETURN;
|
||||
void print_recorded_oops() PRODUCT_RETURN;
|
||||
void print_recorded_metadata() PRODUCT_RETURN;
|
||||
void print_nmethod(bool print_code);
|
||||
|
||||
// need to re-define this from CodeBlob else the overload hides it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue