< prev index next >

src/hotspot/share/jvmci/jvmciRuntime.cpp

Print this page

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

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