< prev index next >

src/hotspot/share/jvmci/jvmciRuntime.cpp

Print this page

2139 #endif
2140       }
2141 
2142       // All buffers in the CodeBuffer are allocated in the CodeCache.
2143       // If the code buffer is created on each compile attempt
2144       // as in C2, then it must be freed.
2145       //code_buffer->free_blob();
2146     } else {
2147       JVMCINMethodData* data = JVMCINMethodData::create(nmethod_mirror_index,
2148                                                         nmethod_entry_patch_offset,
2149                                                         nmethod_mirror_name,
2150                                                         failed_speculations);
2151       nm =  nmethod::new_nmethod(method,
2152                                  compile_id,
2153                                  entry_bci,
2154                                  offsets,
2155                                  orig_pc_offset,
2156                                  debug_info, dependencies, code_buffer,
2157                                  frame_words, oop_map_set,
2158                                  handler_table, implicit_exception_table,
2159                                  compiler, comp_level,
2160                                  speculations, speculations_len, data);
2161 
2162 
2163       // Free codeBlobs
2164       if (nm == nullptr) {
2165         // The CodeCache is full.  Print out warning and disable compilation.
2166         {
2167           MutexUnlocker ml(Compile_lock);
2168           MutexUnlocker locker(MethodCompileQueue_lock);
2169           CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2170         }
2171         result = JVMCI::cache_full;
2172       } else {
2173         nm->set_has_unsafe_access(has_unsafe_access);
2174         nm->set_has_wide_vectors(has_wide_vector);
2175         nm->set_has_monitors(has_monitors);
2176 
2177         JVMCINMethodData* data = nm->jvmci_nmethod_data();
2178         assert(data != nullptr, "must be");
2179         if (install_default) {

2139 #endif
2140       }
2141 
2142       // All buffers in the CodeBuffer are allocated in the CodeCache.
2143       // If the code buffer is created on each compile attempt
2144       // as in C2, then it must be freed.
2145       //code_buffer->free_blob();
2146     } else {
2147       JVMCINMethodData* data = JVMCINMethodData::create(nmethod_mirror_index,
2148                                                         nmethod_entry_patch_offset,
2149                                                         nmethod_mirror_name,
2150                                                         failed_speculations);
2151       nm =  nmethod::new_nmethod(method,
2152                                  compile_id,
2153                                  entry_bci,
2154                                  offsets,
2155                                  orig_pc_offset,
2156                                  debug_info, dependencies, code_buffer,
2157                                  frame_words, oop_map_set,
2158                                  handler_table, implicit_exception_table,
2159                                  compiler, comp_level, nullptr /* SCCEntry */,
2160                                  speculations, speculations_len, data);
2161 
2162 
2163       // Free codeBlobs
2164       if (nm == nullptr) {
2165         // The CodeCache is full.  Print out warning and disable compilation.
2166         {
2167           MutexUnlocker ml(Compile_lock);
2168           MutexUnlocker locker(MethodCompileQueue_lock);
2169           CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2170         }
2171         result = JVMCI::cache_full;
2172       } else {
2173         nm->set_has_unsafe_access(has_unsafe_access);
2174         nm->set_has_wide_vectors(has_wide_vector);
2175         nm->set_has_monitors(has_monitors);
2176 
2177         JVMCINMethodData* data = nm->jvmci_nmethod_data();
2178         assert(data != nullptr, "must be");
2179         if (install_default) {
< prev index next >