src/share/vm/graal/graalCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File GRAAL-218 Sdiff src/share/vm/graal

src/share/vm/graal/graalCompiler.cpp

Print this page




  74   }
  75 
  76   graal_compute_offsets();
  77 
  78   {
  79     GRAAL_VM_ENTRY_MARK;
  80     HandleMark hm;
  81     for (int i = 0; i < Arguments::num_graal_args(); ++i) {
  82       const char* arg = Arguments::graal_args_array()[i];
  83       Handle option = java_lang_String::create_from_str(arg, THREAD);
  84       jboolean result = VMToCompiler::setOption(option);
  85       if (!result) {
  86         tty->print_cr("Invalid option for graal: -G:%s", arg);
  87         vm_abort(false);
  88       }
  89     }
  90     if (UseCompiler) {
  91       VMToCompiler::startCompiler();
  92       _initialized = true;
  93       if (BootstrapGraal) {




  94         VMToCompiler::bootstrap();
  95       }
  96     }
  97   }
  98 }
  99 
 100 void GraalCompiler::deopt_leaf_graph(jlong leaf_graph_id) {
 101   assert(leaf_graph_id != -1, "unexpected leaf graph id");
 102 
 103   if (_deopted_leaf_graph_count < LEAF_GRAPH_ARRAY_SIZE) {
 104     MutexLockerEx y(GraalDeoptLeafGraphIds_lock, Mutex::_no_safepoint_check_flag);
 105     if (_deopted_leaf_graph_count < LEAF_GRAPH_ARRAY_SIZE) {
 106       _deopted_leaf_graphs[_deopted_leaf_graph_count++] = leaf_graph_id;
 107     }
 108   }
 109 }
 110 
 111 oop GraalCompiler::dump_deopted_leaf_graphs(TRAPS) {
 112   if (_deopted_leaf_graph_count == 0) {
 113     return NULL;




  74   }
  75 
  76   graal_compute_offsets();
  77 
  78   {
  79     GRAAL_VM_ENTRY_MARK;
  80     HandleMark hm;
  81     for (int i = 0; i < Arguments::num_graal_args(); ++i) {
  82       const char* arg = Arguments::graal_args_array()[i];
  83       Handle option = java_lang_String::create_from_str(arg, THREAD);
  84       jboolean result = VMToCompiler::setOption(option);
  85       if (!result) {
  86         tty->print_cr("Invalid option for graal: -G:%s", arg);
  87         vm_abort(false);
  88       }
  89     }
  90     if (UseCompiler) {
  91       VMToCompiler::startCompiler();
  92       _initialized = true;
  93       if (BootstrapGraal) {
  94         // We turn off CompileTheWorld and complete the VM startup so that
  95         // Graal can be compiled by C1/C2 when we do a CTW.
  96         NOT_PRODUCT(CompileTheWorld = false);
  97         CompilationPolicy::completed_vm_startup();
  98         VMToCompiler::bootstrap();
  99       }
 100     }
 101   }
 102 }
 103 
 104 void GraalCompiler::deopt_leaf_graph(jlong leaf_graph_id) {
 105   assert(leaf_graph_id != -1, "unexpected leaf graph id");
 106 
 107   if (_deopted_leaf_graph_count < LEAF_GRAPH_ARRAY_SIZE) {
 108     MutexLockerEx y(GraalDeoptLeafGraphIds_lock, Mutex::_no_safepoint_check_flag);
 109     if (_deopted_leaf_graph_count < LEAF_GRAPH_ARRAY_SIZE) {
 110       _deopted_leaf_graphs[_deopted_leaf_graph_count++] = leaf_graph_id;
 111     }
 112   }
 113 }
 114 
 115 oop GraalCompiler::dump_deopted_leaf_graphs(TRAPS) {
 116   if (_deopted_leaf_graph_count == 0) {
 117     return NULL;


src/share/vm/graal/graalCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File