< prev index next >
src/share/vm/aot/aotCodeHeap.hpp
Print this page
rev 13198 : 8183573: Refactor CodeHeap and AOTCodeHeap to devirtualize hot methods
Reviewed-by: rbackman
@@ -189,28 +189,24 @@
int _oop_got_size;
// Collect stubs info
int* _stubs_offsets;
- address _low_boundary;
-
bool _lib_symbols_initialized;
void adjust_boundaries(AOTCompiledMethod* method) {
- address low = _low_boundary;
- if (method->code_begin() < low) {
- low = method->code_begin();
+ char* low = (char*)method->code_begin();
+ if (low < low_boundary()) {
+ _memory.set_low_boundary(low);
+ _memory.set_low(low);
}
- address high = high_boundary();
- if (method->code_end() > high) {
- high = method->code_end();
+ char* high = (char *)method->code_end();
+ if (high > high_boundary()) {
+ _memory.set_high_boundary(high);
+ _memory.set_high(high);
}
assert(_method_count > 0, "methods count should be set already");
-
- _low_boundary = low;
- _memory.set_high_boundary((char *)high);
- _memory.set_high((char *)high);
}
void register_stubs();
void link_shared_runtime_symbols();
@@ -229,24 +225,10 @@
static Klass* lookup_klass(const char* name, int len, const Method* method, Thread* THREAD);
public:
AOTCodeHeap(AOTLib* lib);
virtual ~AOTCodeHeap();
- address low_boundary() const { return _low_boundary; }
- address high_boundary() const { return (address)CodeHeap::high(); }
-
- bool contains(const void* p) const {
- bool result = (low_boundary() <= p) && (p < high_boundary());
- assert(!result || (_method_count > 0), "");
- assert(result == CodeHeap::contains(p), "");
- return result;
- }
-
- bool contains_blob(const CodeBlob* blob) const {
- return CodeHeap::contains(blob->code_begin());
- }
-
AOTCompiledMethod* find_aot(address p) const;
virtual void* find_start(void* p) const;
virtual CodeBlob* find_blob_unsafe(void* start) const;
virtual void* first() const;
< prev index next >