< prev index next >

src/hotspot/share/code/vtableStubs.cpp

Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com


  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/vtableStubs.hpp"
  27 #include "compiler/compileBroker.hpp"
  28 #include "compiler/disassembler.hpp"
  29 #include "logging/log.hpp"
  30 #include "memory/allocation.inline.hpp"
  31 #include "memory/resourceArea.hpp"
  32 #include "oops/instanceKlass.hpp"
  33 #include "oops/klassVtable.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "prims/forte.hpp"
  36 #include "prims/jvmtiExport.hpp"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/mutexLocker.hpp"
  39 #include "runtime/sharedRuntime.hpp"
  40 #include "utilities/align.hpp"
  41 #ifdef COMPILER2
  42 #include "opto/matcher.hpp"
  43 #endif
  44 
  45 // -----------------------------------------------------------------------------------------
  46 // Implementation of VtableStub
  47 
  48 address VtableStub::_chunk             = NULL;
  49 address VtableStub::_chunk_end         = NULL;
  50 VMReg   VtableStub::_receiver_location = VMRegImpl::Bad();
  51 
  52 
  53 void* VtableStub::operator new(size_t size, int code_size) throw() {
  54   assert_lock_strong(VtableStubs_lock);
  55   assert(size == sizeof(VtableStub), "mismatched size");
  56   // compute real VtableStub size (rounded to nearest word)
  57   const int real_size = align_up(code_size + (int)sizeof(VtableStub), wordSize);
  58   // malloc them in chunks to minimize header overhead




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/vtableStubs.hpp"
  27 #include "compiler/compileBroker.hpp"
  28 #include "compiler/disassembler.hpp"
  29 #include "logging/log.hpp"
  30 #include "memory/allocation.inline.hpp"
  31 #include "memory/resourceArea.hpp"
  32 #include "oops/instanceKlass.hpp"
  33 #include "oops/klassVtable.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "prims/forte.hpp"
  36 #include "prims/jvmtiExport.hpp"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/mutexLocker.inline.hpp"
  39 #include "runtime/sharedRuntime.hpp"
  40 #include "utilities/align.hpp"
  41 #ifdef COMPILER2
  42 #include "opto/matcher.hpp"
  43 #endif
  44 
  45 // -----------------------------------------------------------------------------------------
  46 // Implementation of VtableStub
  47 
  48 address VtableStub::_chunk             = NULL;
  49 address VtableStub::_chunk_end         = NULL;
  50 VMReg   VtableStub::_receiver_location = VMRegImpl::Bad();
  51 
  52 
  53 void* VtableStub::operator new(size_t size, int code_size) throw() {
  54   assert_lock_strong(VtableStubs_lock);
  55   assert(size == sizeof(VtableStub), "mismatched size");
  56   // compute real VtableStub size (rounded to nearest word)
  57   const int real_size = align_up(code_size + (int)sizeof(VtableStub), wordSize);
  58   // malloc them in chunks to minimize header overhead


< prev index next >