diff src/share/vm/graal/graalEnv.cpp @ 8215:b89a97928e72

Implement weak reference semantics for HotSpotInstalledCode in the default method installation case. Add new boolean[] array as parameter to the code installation.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 11 Mar 2013 20:55:05 +0100
parents 0799a7efbe7b
children 7ef66078d837
line wrap: on
line diff
--- a/src/share/vm/graal/graalEnv.cpp	Mon Mar 11 17:30:21 2013 +0100
+++ b/src/share/vm/graal/graalEnv.cpp	Mon Mar 11 20:55:05 2013 +0100
@@ -43,6 +43,7 @@
 #include "runtime/sharedRuntime.hpp"
 #include "utilities/dtrace.hpp"
 #include "graal/graalRuntime.hpp"
+#include "graal/graalJavaAccess.hpp"
 
 // ------------------------------------------------------------------
 // Note: the logic of this method should mirror the logic of
@@ -418,7 +419,8 @@
                                 bool has_debug_info,
                                 bool has_unsafe_access,
                                 GrowableArray<jlong>* leaf_graph_ids,
-                                Handle installed_code) {
+                                Handle installed_code,
+                                Handle triggered_deoptimizations) {
   GRAAL_EXCEPTION_CONTEXT;
   NMethodSweeper::possibly_sweep();
   nm = NULL;
@@ -463,7 +465,7 @@
                                debug_info, dependencies, code_buffer,
                                frame_words, oop_map_set,
                                handler_table, &implicit_tbl,
-                               compiler, comp_level, leaf_graph_ids, installed_code);
+                               compiler, comp_level, leaf_graph_ids, installed_code, triggered_deoptimizations);
 
     // Free codeBlobs
     //code_buffer->free_blob();
@@ -492,7 +494,7 @@
       // (Put nm into the task handle *before* publishing to the Java heap.)
       if (task != NULL)  task->set_code(nm);
 
-      if (installed_code.is_null()) {
+      if (HotSpotInstalledCode::isDefault(installed_code())) {
         if (entry_bci == InvocationEntryBci) {
           if (TieredCompilation) {
             // If there is an old version we're done with it