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