hotspot/src/share/vm/ci/ciEnv.cpp
changeset 33451 0712796e4039
parent 31019 d05fcdd70109
child 33626 3c94db05e903
equal deleted inserted replaced
33450:08222df07d0d 33451:0712796e4039
    36 #include "classfile/vmSymbols.hpp"
    36 #include "classfile/vmSymbols.hpp"
    37 #include "code/codeCache.hpp"
    37 #include "code/codeCache.hpp"
    38 #include "code/scopeDesc.hpp"
    38 #include "code/scopeDesc.hpp"
    39 #include "compiler/compileBroker.hpp"
    39 #include "compiler/compileBroker.hpp"
    40 #include "compiler/compileLog.hpp"
    40 #include "compiler/compileLog.hpp"
    41 #include "compiler/compilerOracle.hpp"
    41 #include "compiler/compilerDirectives.hpp"
       
    42 #include "compiler/disassembler.hpp"
    42 #include "gc/shared/collectedHeap.inline.hpp"
    43 #include "gc/shared/collectedHeap.inline.hpp"
    43 #include "interpreter/linkResolver.hpp"
    44 #include "interpreter/linkResolver.hpp"
    44 #include "memory/allocation.inline.hpp"
    45 #include "memory/allocation.inline.hpp"
    45 #include "memory/oopFactory.hpp"
    46 #include "memory/oopFactory.hpp"
    46 #include "memory/universe.inline.hpp"
    47 #include "memory/universe.inline.hpp"
   954                             int frame_words,
   955                             int frame_words,
   955                             OopMapSet* oop_map_set,
   956                             OopMapSet* oop_map_set,
   956                             ExceptionHandlerTable* handler_table,
   957                             ExceptionHandlerTable* handler_table,
   957                             ImplicitExceptionTable* inc_table,
   958                             ImplicitExceptionTable* inc_table,
   958                             AbstractCompiler* compiler,
   959                             AbstractCompiler* compiler,
   959                             int comp_level,
       
   960                             bool has_unsafe_access,
   960                             bool has_unsafe_access,
   961                             bool has_wide_vectors,
   961                             bool has_wide_vectors,
       
   962                             DirectiveSet* directives,
   962                             RTMState  rtm_state) {
   963                             RTMState  rtm_state) {
   963   VM_ENTRY_MARK;
   964   VM_ENTRY_MARK;
   964   nmethod* nm = NULL;
   965   nmethod* nm = NULL;
   965   {
   966   {
   966     // To prevent compile queue updates.
   967     // To prevent compile queue updates.
  1032                                offsets,
  1033                                offsets,
  1033                                orig_pc_offset,
  1034                                orig_pc_offset,
  1034                                debug_info(), dependencies(), code_buffer,
  1035                                debug_info(), dependencies(), code_buffer,
  1035                                frame_words, oop_map_set,
  1036                                frame_words, oop_map_set,
  1036                                handler_table, inc_table,
  1037                                handler_table, inc_table,
  1037                                compiler, comp_level);
  1038                                compiler, task()->comp_level());
       
  1039 
  1038     // Free codeBlobs
  1040     // Free codeBlobs
  1039     code_buffer->free_blob();
  1041     code_buffer->free_blob();
  1040 
  1042 
  1041     if (nm != NULL) {
  1043     if (nm != NULL) {
       
  1044       bool printnmethods = directives->PrintAssemblyOption || directives->PrintNMethodsOption;
       
  1045       if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) {
       
  1046         nm->print_nmethod(printnmethods);
       
  1047       }
       
  1048       if (directives->PrintAssemblyOption) {
       
  1049         Disassembler::decode(nm);
       
  1050       }
       
  1051 
  1042       nm->set_has_unsafe_access(has_unsafe_access);
  1052       nm->set_has_unsafe_access(has_unsafe_access);
  1043       nm->set_has_wide_vectors(has_wide_vectors);
  1053       nm->set_has_wide_vectors(has_wide_vectors);
  1044 #if INCLUDE_RTM_OPT
  1054 #if INCLUDE_RTM_OPT
  1045       nm->set_rtm_state(rtm_state);
  1055       nm->set_rtm_state(rtm_state);
  1046 #endif
  1056 #endif
  1067         if (TraceNMethodInstalls) {
  1077         if (TraceNMethodInstalls) {
  1068           ResourceMark rm;
  1078           ResourceMark rm;
  1069           char *method_name = method->name_and_sig_as_C_string();
  1079           char *method_name = method->name_and_sig_as_C_string();
  1070           ttyLocker ttyl;
  1080           ttyLocker ttyl;
  1071           tty->print_cr("Installing method (%d) %s ",
  1081           tty->print_cr("Installing method (%d) %s ",
  1072                         comp_level,
  1082                         task()->comp_level(),
  1073                         method_name);
  1083                         method_name);
  1074         }
  1084         }
  1075         // Allow the code to be executed
  1085         // Allow the code to be executed
  1076         method->set_code(method, nm);
  1086         method->set_code(method, nm);
  1077       } else {
  1087       } else {
  1078         if (TraceNMethodInstalls) {
  1088         if (TraceNMethodInstalls) {
  1079           ResourceMark rm;
  1089           ResourceMark rm;
  1080           char *method_name = method->name_and_sig_as_C_string();
  1090           char *method_name = method->name_and_sig_as_C_string();
  1081           ttyLocker ttyl;
  1091           ttyLocker ttyl;
  1082           tty->print_cr("Installing osr method (%d) %s @ %d",
  1092           tty->print_cr("Installing osr method (%d) %s @ %d",
  1083                         comp_level,
  1093                         task()->comp_level(),
  1084                         method_name,
  1094                         method_name,
  1085                         entry_bci);
  1095                         entry_bci);
  1086         }
  1096         }
  1087         method->method_holder()->add_osr_nmethod(nm);
  1097         method->method_holder()->add_osr_nmethod(nm);
  1088       }
  1098       }