src/hotspot/share/oops/method.hpp
changeset 55005 9b70ebd131b4
parent 54927 1512d88b24c6
child 55105 9ad765641e8f
child 58678 9cf78a70fa4f
--- a/src/hotspot/share/oops/method.hpp	Thu May 23 09:46:49 2019 +0200
+++ b/src/hotspot/share/oops/method.hpp	Thu May 23 10:13:29 2019 +0200
@@ -463,7 +463,17 @@
   address verified_code_entry();
   bool check_code() const;      // Not inline to avoid circular ref
   CompiledMethod* volatile code() const;
-  void clear_code(bool acquire_lock = true);    // Clear out any compiled code
+
+  // Locks CompiledMethod_lock if not held.
+  void unlink_code(CompiledMethod *compare);
+  // Locks CompiledMethod_lock if not held.
+  void unlink_code();
+
+private:
+  // Either called with CompiledMethod_lock held or from constructor.
+  void clear_code();
+
+public:
   static void set_code(const methodHandle& mh, CompiledMethod* code);
   void set_adapter_entry(AdapterHandlerEntry* adapter) {
     constMethod()->set_adapter_entry(adapter);