43 // malloc them in chunks to minimize header overhead |
43 // malloc them in chunks to minimize header overhead |
44 const int chunk_factor = 32; |
44 const int chunk_factor = 32; |
45 if (_chunk == NULL || _chunk + real_size > _chunk_end) { |
45 if (_chunk == NULL || _chunk + real_size > _chunk_end) { |
46 const int bytes = chunk_factor * real_size + pd_code_alignment(); |
46 const int bytes = chunk_factor * real_size + pd_code_alignment(); |
47 BufferBlob* blob = BufferBlob::create("vtable chunks", bytes); |
47 BufferBlob* blob = BufferBlob::create("vtable chunks", bytes); |
48 if( blob == NULL ) vm_exit_out_of_memory1(bytes, "CodeCache: no room for %s", "vtable chunks"); |
48 if (blob == NULL) { |
|
49 vm_exit_out_of_memory(bytes, "CodeCache: no room for vtable chunks"); |
|
50 } |
49 _chunk = blob->instructions_begin(); |
51 _chunk = blob->instructions_begin(); |
50 _chunk_end = _chunk + bytes; |
52 _chunk_end = _chunk + bytes; |
51 VTune::register_stub("vtable stub", _chunk, _chunk_end); |
53 VTune::register_stub("vtable stub", _chunk, _chunk_end); |
52 Forte::register_stub("vtable stub", _chunk, _chunk_end); |
54 Forte::register_stub("vtable stub", _chunk, _chunk_end); |
53 // Notify JVMTI about this stub. The event will be recorded by the enclosing |
55 // Notify JVMTI about this stub. The event will be recorded by the enclosing |
187 HandleMark hm; |
189 HandleMark hm; |
188 klassOop klass = receiver->klass(); |
190 klassOop klass = receiver->klass(); |
189 instanceKlass* ik = instanceKlass::cast(klass); |
191 instanceKlass* ik = instanceKlass::cast(klass); |
190 klassVtable* vt = ik->vtable(); |
192 klassVtable* vt = ik->vtable(); |
191 klass->print(); |
193 klass->print(); |
192 fatal3("bad compiled vtable dispatch: receiver " INTPTR_FORMAT ", index %d (vtable length %d)", (address)receiver, index, vt->length()); |
194 fatal(err_msg("bad compiled vtable dispatch: receiver " INTPTR_FORMAT ", " |
|
195 "index %d (vtable length %d)", |
|
196 (address)receiver, index, vt->length())); |
193 } |
197 } |
194 |
198 |
195 #endif // Product |
199 #endif // Product |