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