< prev index next >

src/hotspot/share/jvmci/jvmciEnv.cpp

Print this page




 504           ResourceMark m;
 505           tty->print_cr("WARN: endless recompilation of %s. Method was set to not compilable.", method()->name_and_sig_as_C_string());
 506         }
 507 #endif
 508       }
 509 
 510       // All buffers in the CodeBuffer are allocated in the CodeCache.
 511       // If the code buffer is created on each compile attempt
 512       // as in C2, then it must be freed.
 513       //code_buffer->free_blob();
 514     } else {
 515       ImplicitExceptionTable implicit_tbl;
 516       nm =  nmethod::new_nmethod(method,
 517                                  compile_id,
 518                                  entry_bci,
 519                                  offsets,
 520                                  orig_pc_offset,
 521                                  debug_info, dependencies, code_buffer,
 522                                  frame_words, oop_map_set,
 523                                  handler_table, &implicit_tbl,
 524                                  compiler, comp_level, installed_code, speculation_log);


 525 
 526       // Free codeBlobs
 527       //code_buffer->free_blob();
 528       if (nm == NULL) {
 529         // The CodeCache is full.  Print out warning and disable compilation.
 530         {
 531           MutexUnlocker ml(Compile_lock);
 532           MutexUnlocker locker(MethodCompileQueue_lock);
 533           CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
 534         }
 535       } else {
 536         nm->set_has_unsafe_access(has_unsafe_access);
 537         nm->set_has_wide_vectors(has_wide_vector);
 538 
 539         // Record successful registration.
 540         // (Put nm into the task handle *before* publishing to the Java heap.)
 541         CompileTask* task = env == NULL ? NULL : env->task();
 542         if (task != NULL) {
 543           task->set_code(nm);
 544         }




 504           ResourceMark m;
 505           tty->print_cr("WARN: endless recompilation of %s. Method was set to not compilable.", method()->name_and_sig_as_C_string());
 506         }
 507 #endif
 508       }
 509 
 510       // All buffers in the CodeBuffer are allocated in the CodeCache.
 511       // If the code buffer is created on each compile attempt
 512       // as in C2, then it must be freed.
 513       //code_buffer->free_blob();
 514     } else {
 515       ImplicitExceptionTable implicit_tbl;
 516       nm =  nmethod::new_nmethod(method,
 517                                  compile_id,
 518                                  entry_bci,
 519                                  offsets,
 520                                  orig_pc_offset,
 521                                  debug_info, dependencies, code_buffer,
 522                                  frame_words, oop_map_set,
 523                                  handler_table, &implicit_tbl,
 524                                  compiler, comp_level,
 525                                  JNIHandles::make_weak_global(installed_code),
 526                                  JNIHandles::make_weak_global(speculation_log));
 527 
 528       // Free codeBlobs
 529       //code_buffer->free_blob();
 530       if (nm == NULL) {
 531         // The CodeCache is full.  Print out warning and disable compilation.
 532         {
 533           MutexUnlocker ml(Compile_lock);
 534           MutexUnlocker locker(MethodCompileQueue_lock);
 535           CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
 536         }
 537       } else {
 538         nm->set_has_unsafe_access(has_unsafe_access);
 539         nm->set_has_wide_vectors(has_wide_vector);
 540 
 541         // Record successful registration.
 542         // (Put nm into the task handle *before* publishing to the Java heap.)
 543         CompileTask* task = env == NULL ? NULL : env->task();
 544         if (task != NULL) {
 545           task->set_code(nm);
 546         }


< prev index next >