src/share/vm/code/relocInfo.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/code/relocInfo.cpp
src/share/vm/code/relocInfo.cpp
Print this page
*** 579,595 ****
short* p = (short*) dest->locs_end();
address point = dest->locs_point();
normalize_address(_cached_value, dest);
jint x0 = scaled_offset_null_special(_cached_value, point);
! p = pack_1_int_to(p, x0);
dest->set_locs_end((relocInfo*) p);
}
void virtual_call_Relocation::unpack_data() {
! jint x0 = unpack_1_int();
address point = addr();
_cached_value = x0==0? NULL: address_from_scaled_offset(x0, point);
}
--- 579,596 ----
short* p = (short*) dest->locs_end();
address point = dest->locs_point();
normalize_address(_cached_value, dest);
jint x0 = scaled_offset_null_special(_cached_value, point);
! p = pack_2_ints_to(p, x0, _method_index);
dest->set_locs_end((relocInfo*) p);
}
void virtual_call_Relocation::unpack_data() {
! jint x0 = 0;
! unpack_2_ints(x0, _method_index);
address point = addr();
_cached_value = x0==0? NULL: address_from_scaled_offset(x0, point);
}
*** 791,810 ****
--- 792,834 ----
address virtual_call_Relocation::cached_value() {
assert(_cached_value != NULL && _cached_value < addr(), "must precede ic_call");
return _cached_value;
}
+ Method* virtual_call_Relocation::method_value() {
+ Metadata* m = code()->metadata_at(_method_index);
+ assert(m != NULL || _method_index == 0, "should be non-null for non-zero index");
+ assert(m == NULL || m->is_method(), "not a method");
+ return (Method*)m;
+ }
void virtual_call_Relocation::clear_inline_cache() {
// No stubs for ICs
// Clean IC
ResourceMark rm;
CompiledIC* icache = CompiledIC_at(this);
icache->set_to_clean();
}
+ void opt_virtual_call_Relocation::pack_data_to(CodeSection* dest) {
+ short* p = (short*) dest->locs_end();
+ p = pack_1_int_to(p, _method_index);
+ dest->set_locs_end((relocInfo*) p);
+ }
+
+ void opt_virtual_call_Relocation::unpack_data() {
+ _method_index = unpack_1_int();
+ }
+
+ Method* opt_virtual_call_Relocation::method_value() {
+ Metadata* m = code()->metadata_at(_method_index);
+ assert(m != NULL || _method_index == 0, "should be non-null for non-zero index");
+ assert(m == NULL || m->is_method(), "not a method");
+ return (Method*)m;
+ }
+
void opt_virtual_call_Relocation::clear_inline_cache() {
// No stubs for ICs
// Clean IC
ResourceMark rm;
CompiledIC* icache = CompiledIC_at(this);
*** 825,834 ****
--- 849,874 ----
}
}
return NULL;
}
+ Method* static_call_Relocation::method_value() {
+ Metadata* m = code()->metadata_at(_method_index);
+ assert(m != NULL || _method_index == 0, "should be non-null for non-zero index");
+ assert(m == NULL || m->is_method(), "not a method");
+ return (Method*)m;
+ }
+
+ void static_call_Relocation::pack_data_to(CodeSection* dest) {
+ short* p = (short*) dest->locs_end();
+ p = pack_1_int_to(p, _method_index);
+ dest->set_locs_end((relocInfo*) p);
+ }
+
+ void static_call_Relocation::unpack_data() {
+ _method_index = unpack_1_int();
+ }
void static_call_Relocation::clear_inline_cache() {
// Safe call site info
CompiledStaticCall* handler = compiledStaticCall_at(this);
handler->set_to_clean();
*** 1012,1032 ****
DataRelocation* r = (DataRelocation*) reloc();
tty->print(" | [target=" INTPTR_FORMAT "]", p2i(r->value())); //value==target
break;
}
case relocInfo::static_call_type:
case relocInfo::runtime_call_type:
{
CallRelocation* r = (CallRelocation*) reloc();
tty->print(" | [destination=" INTPTR_FORMAT "]", p2i(r->destination()));
break;
}
case relocInfo::virtual_call_type:
{
virtual_call_Relocation* r = (virtual_call_Relocation*) reloc();
! tty->print(" | [destination=" INTPTR_FORMAT " cached_value=" INTPTR_FORMAT "]",
! p2i(r->destination()), p2i(r->cached_value()));
break;
}
case relocInfo::static_stub_type:
{
static_stub_Relocation* r = (static_stub_Relocation*) reloc();
--- 1052,1078 ----
DataRelocation* r = (DataRelocation*) reloc();
tty->print(" | [target=" INTPTR_FORMAT "]", p2i(r->value())); //value==target
break;
}
case relocInfo::static_call_type:
+ {
+ static_call_Relocation* r = (static_call_Relocation*) reloc();
+ tty->print(" | [destination=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT "]",
+ p2i(r->destination()), p2i(r->method_value()));
+ break;
+ }
case relocInfo::runtime_call_type:
{
CallRelocation* r = (CallRelocation*) reloc();
tty->print(" | [destination=" INTPTR_FORMAT "]", p2i(r->destination()));
break;
}
case relocInfo::virtual_call_type:
{
virtual_call_Relocation* r = (virtual_call_Relocation*) reloc();
! tty->print(" | [destination=" INTPTR_FORMAT " cached_value=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT "]",
! p2i(r->destination()), p2i(r->cached_value()), p2i(r->method_value()));
break;
}
case relocInfo::static_stub_type:
{
static_stub_Relocation* r = (static_stub_Relocation*) reloc();
*** 1037,1046 ****
--- 1083,1099 ----
{
trampoline_stub_Relocation* r = (trampoline_stub_Relocation*) reloc();
tty->print(" | [trampoline owner=" INTPTR_FORMAT "]", p2i(r->owner()));
break;
}
+ case relocInfo::opt_virtual_call_type:
+ {
+ opt_virtual_call_Relocation* r = (opt_virtual_call_Relocation*) reloc();
+ tty->print(" | [destination=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT "]",
+ p2i(r->destination()), p2i(r->method_value()));
+ break;
+ }
}
tty->cr();
}
src/share/vm/code/relocInfo.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File