diff src/share/vm/graal/graalEnv.cpp @ 7000:bf2ea3ed3bce

Fixed nmethod not being unloaded after their classloader has been unloaded by initializing _graal_installed_code in an nmethod's constructor
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 21 Nov 2012 23:33:43 +0100
parents 2afd99933ae6
children 263bc2349f15
line wrap: on
line diff
--- a/src/share/vm/graal/graalEnv.cpp	Wed Nov 21 19:23:43 2012 +0100
+++ b/src/share/vm/graal/graalEnv.cpp	Wed Nov 21 23:33:43 2012 +0100
@@ -444,7 +444,7 @@
                                 int compile_id,
                                 bool has_debug_info,
                                 bool has_unsafe_access,
-                                bool bind_to_method) {
+                                Handle installed_code) {
   EXCEPTION_CONTEXT;
   NMethodSweeper::possibly_sweep();
   nmethod* nm = NULL;
@@ -483,7 +483,7 @@
                                debug_info, dependencies, code_buffer,
                                frame_words, oop_map_set,
                                handler_table, inc_table,
-                               compiler, comp_level);
+                               compiler, comp_level, installed_code);
 
     // Free codeBlobs
     //code_buffer->free_blob();
@@ -512,7 +512,7 @@
       // (Put nm into the task handle *before* publishing to the Java heap.)
       if (task != NULL)  task->set_code(nm);
 
-      if (bind_to_method) {
+      if (installed_code.is_null()) {
         if (entry_bci == InvocationEntryBci) {
           if (TieredCompilation) {
             // If there is an old version we're done with it