< prev index next >

src/hotspot/share/code/vtableStubs.cpp

Print this page
rev 54542 : 8213084: Rework and enhance Print[Opto]Assembly output
Reviewed-by:


  63    // There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp
  64    // If changing the name, update the other file accordingly.
  65     VtableBlob* blob = VtableBlob::create("vtable chunks", bytes);
  66     if (blob == NULL) {
  67       return NULL;
  68     }
  69     _chunk = blob->content_begin();
  70     _chunk_end = _chunk + bytes;
  71     Forte::register_stub("vtable stub", _chunk, _chunk_end);
  72     align_chunk();
  73   }
  74   assert(_chunk + real_size <= _chunk_end, "bad allocation");
  75   void* res = _chunk;
  76   _chunk += real_size;
  77   align_chunk();
  78  return res;
  79 }
  80 
  81 
  82 void VtableStub::print_on(outputStream* st) const {
  83   st->print("vtable stub (index = %d, receiver_location = " INTX_FORMAT ", code = [" INTPTR_FORMAT ", " INTPTR_FORMAT "[)",
  84              index(), p2i(receiver_location()), p2i(code_begin()), p2i(code_end()));
  85 }
  86 
  87 
  88 // -----------------------------------------------------------------------------------------
  89 // Implementation of VtableStubs
  90 //
  91 // For each hash value there's a linked list of vtable stubs (with that
  92 // hash value). Each list is anchored in a little hash _table, indexed
  93 // by that hash value.
  94 
  95 VtableStub* VtableStubs::_table[VtableStubs::N];
  96 int VtableStubs::_number_of_vtable_stubs = 0;
  97 int VtableStubs::_vtab_stub_size = 0;
  98 int VtableStubs::_itab_stub_size = 0;
  99 
 100 #if defined(PRODUCT)
 101   // These values are good for the PRODUCT case (no tracing).
 102   static const int first_vtableStub_size =  64;
 103   static const int first_itableStub_size = 256;




  63    // There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp
  64    // If changing the name, update the other file accordingly.
  65     VtableBlob* blob = VtableBlob::create("vtable chunks", bytes);
  66     if (blob == NULL) {
  67       return NULL;
  68     }
  69     _chunk = blob->content_begin();
  70     _chunk_end = _chunk + bytes;
  71     Forte::register_stub("vtable stub", _chunk, _chunk_end);
  72     align_chunk();
  73   }
  74   assert(_chunk + real_size <= _chunk_end, "bad allocation");
  75   void* res = _chunk;
  76   _chunk += real_size;
  77   align_chunk();
  78  return res;
  79 }
  80 
  81 
  82 void VtableStub::print_on(outputStream* st) const {
  83   st->print("vtable stub (index = %d, receiver_location = " INTX_FORMAT ", code = [" INTPTR_FORMAT ", " INTPTR_FORMAT "])",
  84              index(), p2i(receiver_location()), p2i(code_begin()), p2i(code_end()));
  85 }
  86 
  87 
  88 // -----------------------------------------------------------------------------------------
  89 // Implementation of VtableStubs
  90 //
  91 // For each hash value there's a linked list of vtable stubs (with that
  92 // hash value). Each list is anchored in a little hash _table, indexed
  93 // by that hash value.
  94 
  95 VtableStub* VtableStubs::_table[VtableStubs::N];
  96 int VtableStubs::_number_of_vtable_stubs = 0;
  97 int VtableStubs::_vtab_stub_size = 0;
  98 int VtableStubs::_itab_stub_size = 0;
  99 
 100 #if defined(PRODUCT)
 101   // These values are good for the PRODUCT case (no tracing).
 102   static const int first_vtableStub_size =  64;
 103   static const int first_itableStub_size = 256;


< prev index next >