2149 #endif
2150 }
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 failed_speculations);
2161 nm = nmethod::new_nmethod(method,
2162 compile_id,
2163 entry_bci,
2164 offsets,
2165 orig_pc_offset,
2166 debug_info, dependencies, code_buffer,
2167 frame_words, oop_map_set,
2168 handler_table, implicit_exception_table,
2169 compiler, comp_level,
2170 speculations, speculations_len, data);
2171
2172
2173 // Free codeBlobs
2174 if (nm == nullptr) {
2175 // The CodeCache is full. Print out warning and disable compilation.
2176 {
2177 MutexUnlocker ml(Compile_lock);
2178 MutexUnlocker locker(MethodCompileQueue_lock);
2179 CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2180 }
2181 result = JVMCI::cache_full;
2182 } else {
2183 nm->set_has_unsafe_access(has_unsafe_access);
2184 nm->set_has_wide_vectors(has_wide_vector);
2185 nm->set_has_monitors(has_monitors);
2186 nm->set_has_scoped_access(true); // conservative
2187
2188 JVMCINMethodData* data = nm->jvmci_nmethod_data();
2189 assert(data != nullptr, "must be");
|
2149 #endif
2150 }
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 failed_speculations);
2161 nm = nmethod::new_nmethod(method,
2162 compile_id,
2163 entry_bci,
2164 offsets,
2165 orig_pc_offset,
2166 debug_info, dependencies, code_buffer,
2167 frame_words, oop_map_set,
2168 handler_table, implicit_exception_table,
2169 compiler, comp_level, nullptr /* SCCEntry */,
2170 speculations, speculations_len, data);
2171
2172
2173 // Free codeBlobs
2174 if (nm == nullptr) {
2175 // The CodeCache is full. Print out warning and disable compilation.
2176 {
2177 MutexUnlocker ml(Compile_lock);
2178 MutexUnlocker locker(MethodCompileQueue_lock);
2179 CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2180 }
2181 result = JVMCI::cache_full;
2182 } else {
2183 nm->set_has_unsafe_access(has_unsafe_access);
2184 nm->set_has_wide_vectors(has_wide_vector);
2185 nm->set_has_monitors(has_monitors);
2186 nm->set_has_scoped_access(true); // conservative
2187
2188 JVMCINMethodData* data = nm->jvmci_nmethod_data();
2189 assert(data != nullptr, "must be");
|