< prev index next >

src/hotspot/share/code/nmethod.cpp

Print this page
*** 500,12 ***
    CodeBuffer* code_buffer, int frame_size,
    OopMapSet* oop_maps,
    ExceptionHandlerTable* handler_table,
    ImplicitExceptionTable* nul_chk_table,
    AbstractCompiler* compiler,
!   int comp_level,
-   const GrowableArrayView<RuntimeStub*>& native_invokers
  #if INCLUDE_JVMCI
    , char* speculations,
    int speculations_len,
    int nmethod_mirror_index,
    const char* nmethod_mirror_name,
--- 500,11 ---
    CodeBuffer* code_buffer, int frame_size,
    OopMapSet* oop_maps,
    ExceptionHandlerTable* handler_table,
    ImplicitExceptionTable* nul_chk_table,
    AbstractCompiler* compiler,
!   int comp_level
  #if INCLUDE_JVMCI
    , char* speculations,
    int speculations_len,
    int nmethod_mirror_index,
    const char* nmethod_mirror_name,

*** 523,11 ***
  #endif
      int nmethod_size =
        CodeBlob::allocation_size(code_buffer, sizeof(nmethod))
        + adjust_pcs_size(debug_info->pcs_size())
        + align_up((int)dependencies->size_in_bytes(), oopSize)
-       + align_up(checked_cast<int>(native_invokers.data_size_in_bytes()), oopSize)
        + align_up(handler_table->size_in_bytes()    , oopSize)
        + align_up(nul_chk_table->size_in_bytes()    , oopSize)
  #if INCLUDE_JVMCI
        + align_up(speculations_len                  , oopSize)
        + align_up(jvmci_data_size                   , oopSize)
--- 522,10 ---

*** 539,12 ***
              orig_pc_offset, debug_info, dependencies, code_buffer, frame_size,
              oop_maps,
              handler_table,
              nul_chk_table,
              compiler,
!             comp_level,
-             native_invokers
  #if INCLUDE_JVMCI
              , speculations,
              speculations_len,
              jvmci_data_size
  #endif
--- 537,11 ---
              orig_pc_offset, debug_info, dependencies, code_buffer, frame_size,
              oop_maps,
              handler_table,
              nul_chk_table,
              compiler,
!             comp_level
  #if INCLUDE_JVMCI
              , speculations,
              speculations_len,
              jvmci_data_size
  #endif

*** 628,12 ***
      _oops_offset             = data_offset();
      _metadata_offset         = _oops_offset         + align_up(code_buffer->total_oop_size(), oopSize);
      scopes_data_offset       = _metadata_offset     + align_up(code_buffer->total_metadata_size(), wordSize);
      _scopes_pcs_offset       = scopes_data_offset;
      _dependencies_offset     = _scopes_pcs_offset;
!     _native_invokers_offset     = _dependencies_offset;
-     _handler_table_offset    = _native_invokers_offset;
      _nul_chk_table_offset    = _handler_table_offset;
  #if INCLUDE_JVMCI
      _speculations_offset     = _nul_chk_table_offset;
      _jvmci_data_offset       = _speculations_offset;
      _nmethod_end_offset      = _jvmci_data_offset;
--- 625,11 ---
      _oops_offset             = data_offset();
      _metadata_offset         = _oops_offset         + align_up(code_buffer->total_oop_size(), oopSize);
      scopes_data_offset       = _metadata_offset     + align_up(code_buffer->total_metadata_size(), wordSize);
      _scopes_pcs_offset       = scopes_data_offset;
      _dependencies_offset     = _scopes_pcs_offset;
!     _handler_table_offset    = _dependencies_offset;
      _nul_chk_table_offset    = _handler_table_offset;
  #if INCLUDE_JVMCI
      _speculations_offset     = _nul_chk_table_offset;
      _jvmci_data_offset       = _speculations_offset;
      _nmethod_end_offset      = _jvmci_data_offset;

*** 725,12 ***
    int frame_size,
    OopMapSet* oop_maps,
    ExceptionHandlerTable* handler_table,
    ImplicitExceptionTable* nul_chk_table,
    AbstractCompiler* compiler,
!   int comp_level,
-   const GrowableArrayView<RuntimeStub*>& native_invokers
  #if INCLUDE_JVMCI
    , char* speculations,
    int speculations_len,
    int jvmci_data_size
  #endif
--- 721,11 ---
    int frame_size,
    OopMapSet* oop_maps,
    ExceptionHandlerTable* handler_table,
    ImplicitExceptionTable* nul_chk_table,
    AbstractCompiler* compiler,
!   int comp_level
  #if INCLUDE_JVMCI
    , char* speculations,
    int speculations_len,
    int jvmci_data_size
  #endif

*** 803,12 ***
      _metadata_offset         = _oops_offset          + align_up(code_buffer->total_oop_size(), oopSize);
      int scopes_data_offset   = _metadata_offset      + align_up(code_buffer->total_metadata_size(), wordSize);
  
      _scopes_pcs_offset       = scopes_data_offset    + align_up(debug_info->data_size       (), oopSize);
      _dependencies_offset     = _scopes_pcs_offset    + adjust_pcs_size(debug_info->pcs_size());
!     _native_invokers_offset  = _dependencies_offset  + align_up((int)dependencies->size_in_bytes(), oopSize);
-     _handler_table_offset    = _native_invokers_offset + align_up(checked_cast<int>(native_invokers.data_size_in_bytes()), oopSize);
      _nul_chk_table_offset    = _handler_table_offset + align_up(handler_table->size_in_bytes(), oopSize);
  #if INCLUDE_JVMCI
      _speculations_offset     = _nul_chk_table_offset + align_up(nul_chk_table->size_in_bytes(), oopSize);
      _jvmci_data_offset       = _speculations_offset  + align_up(speculations_len, oopSize);
      _nmethod_end_offset      = _jvmci_data_offset    + align_up(jvmci_data_size, oopSize);
--- 798,11 ---
      _metadata_offset         = _oops_offset          + align_up(code_buffer->total_oop_size(), oopSize);
      int scopes_data_offset   = _metadata_offset      + align_up(code_buffer->total_metadata_size(), wordSize);
  
      _scopes_pcs_offset       = scopes_data_offset    + align_up(debug_info->data_size       (), oopSize);
      _dependencies_offset     = _scopes_pcs_offset    + adjust_pcs_size(debug_info->pcs_size());
!     _handler_table_offset    = _dependencies_offset  + align_up((int)dependencies->size_in_bytes(), oopSize);
      _nul_chk_table_offset    = _handler_table_offset + align_up(handler_table->size_in_bytes(), oopSize);
  #if INCLUDE_JVMCI
      _speculations_offset     = _nul_chk_table_offset + align_up(nul_chk_table->size_in_bytes(), oopSize);
      _jvmci_data_offset       = _speculations_offset  + align_up(speculations_len, oopSize);
      _nmethod_end_offset      = _jvmci_data_offset    + align_up(jvmci_data_size, oopSize);

*** 826,14 ***
      code_buffer->copy_code_and_locs_to(this);
      // Copy contents of ScopeDescRecorder to nmethod
      code_buffer->copy_values_to(this);
      debug_info->copy_to(this);
      dependencies->copy_to(this);
-     if (native_invokers.is_nonempty()) { // can not get address of zero-length array
-       // Copy native stubs
-       memcpy(native_invokers_begin(), native_invokers.adr_at(0), native_invokers.data_size_in_bytes());
-     }
      clear_unloading_state();
  
      Universe::heap()->register_nmethod(this);
      debug_only(Universe::heap()->verify_nmethod(this));
  
--- 820,10 ---

*** 994,14 ***
      }
      if (printmethod || PrintDependencies || CompilerOracle::has_option(mh, CompileCommand::PrintDependencies)) {
        print_dependencies();
        tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
      }
-     if (printmethod && native_invokers_begin() < native_invokers_end()) {
-       print_native_invokers();
-       tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
-     }
      if (printmethod || PrintExceptionHandlers) {
        print_handler_table();
        tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
        print_nul_chk_table();
        tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
--- 984,10 ---

*** 1058,16 ***
    for (int index = 0 ; index < length; index++) {
      dest[index] = array->at(index);
    }
  }
  
- void nmethod::free_native_invokers() {
-   for (RuntimeStub** it = native_invokers_begin(); it < native_invokers_end(); it++) {
-     CodeCache::free(*it);
-   }
- }
- 
  void nmethod::fix_oop_relocations(address begin, address end, bool initialize_immediates) {
    // re-patch all oop-bearing instructions, just in case some oops moved
    RelocIterator iter(this, begin, end);
    while (iter.next()) {
      if (iter.type() == relocInfo::oop_type) {
--- 1044,10 ---

*** 2713,18 ***
    } else {
      st->print_cr(" <list empty>");
    }
  }
  
- void nmethod::print_native_invokers() {
-   ResourceMark m;       // in case methods get printed via debugger
-   tty->print_cr("Native invokers:");
-   for (RuntimeStub** itt = native_invokers_begin(); itt < native_invokers_end(); itt++) {
-     (*itt)->print_on(tty);
-   }
- }
- 
  void nmethod::print_handler_table() {
    ExceptionHandlerTable(this).print(code_begin());
  }
  
  void nmethod::print_nul_chk_table() {
--- 2693,10 ---
< prev index next >