changeset 4320:125678ef7587

Fix compiled method unloading.
author Andreas Woess <andreas.woess@jku.at>
date Wed, 25 Jan 2012 14:09:59 +0100
parents 3c21eee8ab4d
children e02b67e39aa3
files src/share/vm/code/nmethod.cpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Tue Jan 24 19:17:28 2012 +0100
+++ b/src/share/vm/code/nmethod.cpp	Wed Jan 25 14:09:59 2012 +0100
@@ -1235,6 +1235,14 @@
     }
     _method = NULL;            // Clear the method of this dead nmethod
   }
+
+#ifdef GRAAL
+    if (_graal_compiled_method != NULL) {
+      HotSpotCompiledMethod::set_nmethod(_graal_compiled_method, 0);
+      _graal_compiled_method = NULL;
+    }
+#endif
+
   // Make the class unloaded - i.e., change state and notify sweeper
   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
   if (is_in_use()) {