< prev index next >
src/hotspot/share/code/nmethod.hpp
Print this page
rev 56251 : imported patch 8226705-v1
rev 56252 : imported patch 8226705-v2
@@ -117,11 +117,11 @@
bool _has_flushed_dependencies; // Used for maintenance of dependencies (CodeCache_lock)
// used by jvmti to track if an unload event has been posted for this nmethod.
bool _unload_reported;
- // Protected by Patching_lock
+ // Protected by CompiledMethod_lock
volatile signed char _state; // {not_installed, in_use, not_entrant, zombie, unloaded}
#ifdef ASSERT
bool _oops_are_stale; // indicates that it's no longer safe to access oops section
#endif
@@ -355,11 +355,13 @@
// rtm state accessing and manipulating
RTMState rtm_state() const { return _rtm_state; }
void set_rtm_state(RTMState state) { _rtm_state = state; }
#endif
- void make_in_use() { _state = in_use; }
+ bool make_in_use() {
+ return try_transition(in_use);
+ }
// Make the nmethod non entrant. The nmethod will continue to be
// alive. It is used when an uncommon trap happens. Returns true
// if this thread changed the state of the nmethod or false if
// another thread performed the transition.
bool make_not_entrant() {
@@ -388,11 +390,11 @@
_has_flushed_dependencies = 1;
}
int comp_level() const { return _comp_level; }
- void unlink_from_method(bool acquire_lock);
+ void unlink_from_method();
// Support for oops in scopes and relocs:
// Note: index 0 is reserved for null.
oop oop_at(int index) const;
oop oop_at_phantom(int index) const; // phantom reference
< prev index next >