src/share/vm/ci/ciEnv.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8038286 Sdiff src/share/vm/ci

src/share/vm/ci/ciEnv.cpp

Print this page




1021 
1022       // All buffers in the CodeBuffer are allocated in the CodeCache.
1023       // If the code buffer is created on each compile attempt
1024       // as in C2, then it must be freed.
1025       code_buffer->free_blob();
1026       return;
1027     }
1028 
1029     assert(offsets->value(CodeOffsets::Deopt) != -1, "must have deopt entry");
1030     assert(offsets->value(CodeOffsets::Exceptions) != -1, "must have exception entry");
1031 
1032     nm =  nmethod::new_nmethod(method,
1033                                compile_id(),
1034                                entry_bci,
1035                                offsets,
1036                                orig_pc_offset,
1037                                debug_info(), dependencies(), code_buffer,
1038                                frame_words, oop_map_set,
1039                                handler_table, inc_table,
1040                                compiler, comp_level);
1041 #if INCLUDE_RTM_OPT
1042     nm->set_rtm_state(rtm_state);
1043 #endif
1044     // Free codeBlobs
1045     code_buffer->free_blob();
1046 
1047     if (nm != NULL) {
1048       nm->set_has_unsafe_access(has_unsafe_access);
1049       nm->set_has_wide_vectors(has_wide_vectors);



1050 
1051       // Record successful registration.
1052       // (Put nm into the task handle *before* publishing to the Java heap.)
1053       if (task() != NULL) {
1054         task()->set_code(nm);
1055       }
1056 
1057       if (entry_bci == InvocationEntryBci) {
1058         if (TieredCompilation) {
1059           // If there is an old version we're done with it
1060           nmethod* old = method->code();
1061           if (TraceMethodReplacement && old != NULL) {
1062             ResourceMark rm;
1063             char *method_name = method->name_and_sig_as_C_string();
1064             tty->print_cr("Replacing method %s", method_name);
1065           }
1066           if (old != NULL) {
1067             old->make_not_entrant();
1068           }
1069         }




1021 
1022       // All buffers in the CodeBuffer are allocated in the CodeCache.
1023       // If the code buffer is created on each compile attempt
1024       // as in C2, then it must be freed.
1025       code_buffer->free_blob();
1026       return;
1027     }
1028 
1029     assert(offsets->value(CodeOffsets::Deopt) != -1, "must have deopt entry");
1030     assert(offsets->value(CodeOffsets::Exceptions) != -1, "must have exception entry");
1031 
1032     nm =  nmethod::new_nmethod(method,
1033                                compile_id(),
1034                                entry_bci,
1035                                offsets,
1036                                orig_pc_offset,
1037                                debug_info(), dependencies(), code_buffer,
1038                                frame_words, oop_map_set,
1039                                handler_table, inc_table,
1040                                compiler, comp_level);



1041     // Free codeBlobs
1042     code_buffer->free_blob();
1043 
1044     if (nm != NULL) {
1045       nm->set_has_unsafe_access(has_unsafe_access);
1046       nm->set_has_wide_vectors(has_wide_vectors);
1047 #if INCLUDE_RTM_OPT
1048       nm->set_rtm_state(rtm_state);
1049 #endif
1050 
1051       // Record successful registration.
1052       // (Put nm into the task handle *before* publishing to the Java heap.)
1053       if (task() != NULL) {
1054         task()->set_code(nm);
1055       }
1056 
1057       if (entry_bci == InvocationEntryBci) {
1058         if (TieredCompilation) {
1059           // If there is an old version we're done with it
1060           nmethod* old = method->code();
1061           if (TraceMethodReplacement && old != NULL) {
1062             ResourceMark rm;
1063             char *method_name = method->name_and_sig_as_C_string();
1064             tty->print_cr("Replacing method %s", method_name);
1065           }
1066           if (old != NULL) {
1067             old->make_not_entrant();
1068           }
1069         }


src/share/vm/ci/ciEnv.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File