< prev index next >

src/hotspot/share/jvmci/jvmciRuntime.cpp

Print this page

2164 #endif
2165       }
2166 
2167       // All buffers in the CodeBuffer are allocated in the CodeCache.
2168       // If the code buffer is created on each compile attempt
2169       // as in C2, then it must be freed.
2170       //code_buffer->free_blob();
2171     } else {
2172       JVMCINMethodData* data = JVMCINMethodData::create(nmethod_mirror_index,
2173                                                         nmethod_entry_patch_offset,
2174                                                         nmethod_mirror_name,
2175                                                         failed_speculations);
2176       nm =  nmethod::new_nmethod(method,
2177                                  compile_id,
2178                                  entry_bci,
2179                                  offsets,
2180                                  orig_pc_offset,
2181                                  debug_info, dependencies, code_buffer,
2182                                  frame_words, oop_map_set,
2183                                  handler_table, implicit_exception_table,
2184                                  compiler, comp_level,
2185                                  speculations, speculations_len, data);
2186 
2187 
2188       // Free codeBlobs
2189       if (nm == nullptr) {
2190         // The CodeCache is full.  Print out warning and disable compilation.
2191         {
2192           MutexUnlocker ml(Compile_lock);
2193           MutexUnlocker locker(MethodCompileQueue_lock);
2194           CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2195         }
2196         result = JVMCI::cache_full;
2197       } else {
2198         nm->set_has_unsafe_access(has_unsafe_access);
2199         nm->set_has_wide_vectors(has_wide_vector);
2200         nm->set_has_monitors(has_monitors);
2201 
2202         JVMCINMethodData* data = nm->jvmci_nmethod_data();
2203         assert(data != nullptr, "must be");
2204         if (install_default) {

2164 #endif
2165       }
2166 
2167       // All buffers in the CodeBuffer are allocated in the CodeCache.
2168       // If the code buffer is created on each compile attempt
2169       // as in C2, then it must be freed.
2170       //code_buffer->free_blob();
2171     } else {
2172       JVMCINMethodData* data = JVMCINMethodData::create(nmethod_mirror_index,
2173                                                         nmethod_entry_patch_offset,
2174                                                         nmethod_mirror_name,
2175                                                         failed_speculations);
2176       nm =  nmethod::new_nmethod(method,
2177                                  compile_id,
2178                                  entry_bci,
2179                                  offsets,
2180                                  orig_pc_offset,
2181                                  debug_info, dependencies, code_buffer,
2182                                  frame_words, oop_map_set,
2183                                  handler_table, implicit_exception_table,
2184                                  compiler, comp_level, nullptr /* SCCEntry */,
2185                                  speculations, speculations_len, data);
2186 
2187 
2188       // Free codeBlobs
2189       if (nm == nullptr) {
2190         // The CodeCache is full.  Print out warning and disable compilation.
2191         {
2192           MutexUnlocker ml(Compile_lock);
2193           MutexUnlocker locker(MethodCompileQueue_lock);
2194           CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2195         }
2196         result = JVMCI::cache_full;
2197       } else {
2198         nm->set_has_unsafe_access(has_unsafe_access);
2199         nm->set_has_wide_vectors(has_wide_vector);
2200         nm->set_has_monitors(has_monitors);
2201 
2202         JVMCINMethodData* data = nm->jvmci_nmethod_data();
2203         assert(data != nullptr, "must be");
2204         if (install_default) {
< prev index next >