2101 if (mdp->decompile_count() > (uint)PerMethodRecompilationCutoff) {
2102 ResourceMark m;
2103 tty->print_cr("WARN: endless recompilation of %s. Method was set to not compilable.", method()->name_and_sig_as_C_string());
2104 }
2105 #endif
2106 }
2107
2108 // All buffers in the CodeBuffer are allocated in the CodeCache.
2109 // If the code buffer is created on each compile attempt
2110 // as in C2, then it must be freed.
2111 //code_buffer->free_blob();
2112 } else {
2113 nm = nmethod::new_nmethod(method,
2114 compile_id,
2115 entry_bci,
2116 offsets,
2117 orig_pc_offset,
2118 debug_info, dependencies, code_buffer,
2119 frame_words, oop_map_set,
2120 handler_table, implicit_exception_table,
2121 compiler, comp_level, GrowableArrayView<RuntimeStub*>::EMPTY,
2122 speculations, speculations_len,
2123 nmethod_mirror_index, nmethod_mirror_name, failed_speculations);
2124
2125
2126 // Free codeBlobs
2127 if (nm == NULL) {
2128 // The CodeCache is full. Print out warning and disable compilation.
2129 {
2130 MutexUnlocker ml(Compile_lock);
2131 MutexUnlocker locker(MethodCompileQueue_lock);
2132 CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2133 }
2134 result = JVMCI::cache_full;
2135 } else {
2136 nm->set_has_unsafe_access(has_unsafe_access);
2137 nm->set_has_wide_vectors(has_wide_vector);
2138
2139 // Record successful registration.
2140 // (Put nm into the task handle *before* publishing to the Java heap.)
2141 if (JVMCIENV->compile_state() != NULL) {
|
2101 if (mdp->decompile_count() > (uint)PerMethodRecompilationCutoff) {
2102 ResourceMark m;
2103 tty->print_cr("WARN: endless recompilation of %s. Method was set to not compilable.", method()->name_and_sig_as_C_string());
2104 }
2105 #endif
2106 }
2107
2108 // All buffers in the CodeBuffer are allocated in the CodeCache.
2109 // If the code buffer is created on each compile attempt
2110 // as in C2, then it must be freed.
2111 //code_buffer->free_blob();
2112 } else {
2113 nm = nmethod::new_nmethod(method,
2114 compile_id,
2115 entry_bci,
2116 offsets,
2117 orig_pc_offset,
2118 debug_info, dependencies, code_buffer,
2119 frame_words, oop_map_set,
2120 handler_table, implicit_exception_table,
2121 compiler, comp_level,
2122 speculations, speculations_len,
2123 nmethod_mirror_index, nmethod_mirror_name, failed_speculations);
2124
2125
2126 // Free codeBlobs
2127 if (nm == NULL) {
2128 // The CodeCache is full. Print out warning and disable compilation.
2129 {
2130 MutexUnlocker ml(Compile_lock);
2131 MutexUnlocker locker(MethodCompileQueue_lock);
2132 CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
2133 }
2134 result = JVMCI::cache_full;
2135 } else {
2136 nm->set_has_unsafe_access(has_unsafe_access);
2137 nm->set_has_wide_vectors(has_wide_vector);
2138
2139 // Record successful registration.
2140 // (Put nm into the task handle *before* publishing to the Java heap.)
2141 if (JVMCIENV->compile_state() != NULL) {
|