src/share/vm/oops/methodOop.hpp
Print this page
rev 1083 : code cache unloading for webrev 091214
@@ -124,10 +124,11 @@
// "_code->entry_point()". Because of tiered compilation and de-opt, this
// field can come and go. It can transition from NULL to not-null at any
// time (whenever a compile completes). It can transition from not-null to
// NULL only at safepoints (because of a de-opt).
nmethod* volatile _code; // Points to the corresponding piece of native code
+ nmethod* volatile _saved_code; // remember nmethod while we attempt to clear code cache space
volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
public:
static const bool IsUnsafeConc = false;
@@ -300,11 +301,14 @@
// nmethod/verified compiler entry
address verified_code_entry();
bool check_code() const; // Not inline to avoid circular ref
nmethod* volatile code() const { assert( check_code(), "" ); return (nmethod *)OrderAccess::load_ptr_acquire(&_code); }
+ nmethod* saved_code() const { return _saved_code; }
+ void set_saved_code(nmethod* code) { _saved_code = code; }
void clear_code(); // Clear out any compiled code
+ void clear_code_hedge(); // Clear out any compiled code and save code ptr in attempt to clean up code cache
void set_code(methodHandle mh, nmethod* code);
void set_adapter_entry(AdapterHandlerEntry* adapter) { _adapter = adapter; }
address get_i2c_entry();
address get_c2i_entry();
address get_c2i_unverified_entry();