src/share/vm/code/relocInfo.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6951083 Cdiff src/share/vm/code/relocInfo.hpp
src/share/vm/code/relocInfo.hpp
Print this page
*** 510,520 ****
private:
address _limit; // stop producing relocations after this _addr
relocInfo* _current; // the current relocation information
relocInfo* _end; // end marker; we're done iterating when _current == _end
! CodeBlob* _code; // compiled method containing _addr
address _addr; // instruction to which the relocation applies
short _databuf; // spare buffer for compressed data
short* _data; // pointer to the relocation's data
short _datalen; // number of halfwords in _data
char _format; // position within the instruction
--- 510,520 ----
private:
address _limit; // stop producing relocations after this _addr
relocInfo* _current; // the current relocation information
relocInfo* _end; // end marker; we're done iterating when _current == _end
! nmethod* _code; // compiled method containing _addr
address _addr; // instruction to which the relocation applies
short _databuf; // spare buffer for compressed data
short* _data; // pointer to the relocation's data
short _datalen; // number of halfwords in _data
char _format; // position within the instruction
*** 547,565 ****
}
}
address compute_section_start(int n) const; // out-of-line helper
! void initialize(CodeBlob* nm, address begin, address limit);
friend class PatchingRelocIterator;
// make an uninitialized one, for PatchingRelocIterator:
RelocIterator() { initialize_misc(); }
public:
// constructor
! RelocIterator(CodeBlob* cb, address begin = NULL, address limit = NULL);
RelocIterator(CodeSection* cb, address begin = NULL, address limit = NULL);
// get next reloc info, return !eos
bool next() {
_current++;
--- 547,565 ----
}
}
address compute_section_start(int n) const; // out-of-line helper
! void initialize(nmethod* nm, address begin, address limit);
friend class PatchingRelocIterator;
// make an uninitialized one, for PatchingRelocIterator:
RelocIterator() { initialize_misc(); }
public:
// constructor
! RelocIterator(nmethod* nm, address begin = NULL, address limit = NULL);
RelocIterator(CodeSection* cb, address begin = NULL, address limit = NULL);
// get next reloc info, return !eos
bool next() {
_current++;
*** 590,600 ****
address limit() const { return _limit; }
void set_limit(address x);
relocType type() const { return current()->type(); }
int format() const { return (relocInfo::have_format) ? current()->format() : 0; }
address addr() const { return _addr; }
! CodeBlob* code() const { return _code; }
short* data() const { return _data; }
int datalen() const { return _datalen; }
bool has_current() const { return _datalen >= 0; }
void set_addr(address addr) { _addr = addr; }
--- 590,600 ----
address limit() const { return _limit; }
void set_limit(address x);
relocType type() const { return current()->type(); }
int format() const { return (relocInfo::have_format) ? current()->format() : 0; }
address addr() const { return _addr; }
! nmethod* code() const { return _code; }
short* data() const { return _data; }
int datalen() const { return _datalen; }
bool has_current() const { return _datalen >= 0; }
void set_addr(address addr) { _addr = addr; }
*** 789,799 ****
void normalize_address(address& addr, const CodeSection* dest, bool allow_other_sections = false);
public:
// accessors which only make sense for a bound Relocation
address addr() const { return binding()->addr(); }
! CodeBlob* code() const { return binding()->code(); }
bool addr_in_const() const { return binding()->addr_in_const(); }
protected:
short* data() const { return binding()->data(); }
int datalen() const { return binding()->datalen(); }
int format() const { return binding()->format(); }
--- 789,799 ----
void normalize_address(address& addr, const CodeSection* dest, bool allow_other_sections = false);
public:
// accessors which only make sense for a bound Relocation
address addr() const { return binding()->addr(); }
! nmethod* code() const { return binding()->code(); }
bool addr_in_const() const { return binding()->addr_in_const(); }
protected:
short* data() const { return binding()->data(); }
int datalen() const { return binding()->datalen(); }
int format() const { return binding()->format(); }
*** 980,995 ****
void clear_inline_cache();
// Figure out where an ic_call is hiding, given a set-oop or call.
// Either ic_call or first_oop must be non-null; the other is deduced.
! // Code if non-NULL must be the CodeBlob, else it is deduced.
// The address of the patchable oop is also deduced.
// The returned iterator will enumerate over the oops and the ic_call,
// as well as any other relocations that happen to be in that span of code.
// Recognize relevant set_oops with: oop_reloc()->oop_addr() == oop_addr.
! static RelocIterator parse_ic(CodeBlob* &code, address &ic_call, address &first_oop, oop* &oop_addr, bool *is_optimized);
};
class opt_virtual_call_Relocation : public CallRelocation {
relocInfo::relocType type() { return relocInfo::opt_virtual_call_type; }
--- 980,995 ----
void clear_inline_cache();
// Figure out where an ic_call is hiding, given a set-oop or call.
// Either ic_call or first_oop must be non-null; the other is deduced.
! // Code if non-NULL must be the nmethod, else it is deduced.
// The address of the patchable oop is also deduced.
// The returned iterator will enumerate over the oops and the ic_call,
// as well as any other relocations that happen to be in that span of code.
// Recognize relevant set_oops with: oop_reloc()->oop_addr() == oop_addr.
! static RelocIterator parse_ic(nmethod* &nm, address &ic_call, address &first_oop, oop* &oop_addr, bool *is_optimized);
};
class opt_virtual_call_Relocation : public CallRelocation {
relocInfo::relocType type() { return relocInfo::opt_virtual_call_type; }
*** 1302,1313 ****
return r; \
}
APPLY_TO_RELOCATIONS(EACH_CASE);
#undef EACH_CASE
! inline RelocIterator::RelocIterator(CodeBlob* cb, address begin, address limit) {
! initialize(cb, begin, limit);
}
// if you are going to patch code, you should use this subclass of
// RelocIterator
class PatchingRelocIterator : public RelocIterator {
--- 1302,1313 ----
return r; \
}
APPLY_TO_RELOCATIONS(EACH_CASE);
#undef EACH_CASE
! inline RelocIterator::RelocIterator(nmethod* nm, address begin, address limit) {
! initialize(nm, begin, limit);
}
// if you are going to patch code, you should use this subclass of
// RelocIterator
class PatchingRelocIterator : public RelocIterator {
*** 1321,1330 ****
// these are private and have no bodies defined because they should not be called
PatchingRelocIterator(const RelocIterator&);
void operator=(const RelocIterator&);
public:
! PatchingRelocIterator(CodeBlob* cb, address begin =NULL, address limit =NULL)
! : RelocIterator(cb, begin, limit) { prepass(); }
~PatchingRelocIterator() { postpass(); }
};
--- 1321,1330 ----
// these are private and have no bodies defined because they should not be called
PatchingRelocIterator(const RelocIterator&);
void operator=(const RelocIterator&);
public:
! PatchingRelocIterator(nmethod* nm, address begin = NULL, address limit = NULL)
! : RelocIterator(nm, begin, limit) { prepass(); }
~PatchingRelocIterator() { postpass(); }
};
src/share/vm/code/relocInfo.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File