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